OSDN Git Service

Attempt 3: Resubmit "[Support] Expose flattenWindowsCommandLine."
authorZachary Turner <zturner@google.com>
Sun, 10 Jun 2018 20:57:14 +0000 (20:57 +0000)
committerZachary Turner <zturner@google.com>
Sun, 10 Jun 2018 20:57:14 +0000 (20:57 +0000)
commit07d33bf7d7df1df00c40bdc859c17025d8457cf8
tree9c7bfb303589805ce876d56ef8bd12c3ab2ffbae
parente956ae9dc32292186118ff33e0d544fdb2e30d69
Attempt 3: Resubmit "[Support] Expose flattenWindowsCommandLine."

I took some liberties and quoted fewer characters than before,
based on an article from MSDN which says that only certain characters
cause an arg to require quoting.  This seems to be incorrect, though,
and worse it seems to be a difference in Windows version.  The bot
that fails is Windows 7, and I can't reproduce the failure on Win
10.  But it's definitely related to quoting and special characters,
because both tests that fail have a * in the argument, which is one
of the special characters that would cause an argument to be quoted
before but not any longer after the new patch.

Since I don't have Win 7, all I can do is just guess that I need to
restore the old quoting rules.  So this patch does that in hopes that
it fixes the problem on Windows 7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334375 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Program.h
lib/Support/Program.cpp
lib/Support/Unix/Program.inc
lib/Support/Windows/Path.inc
lib/Support/Windows/Program.inc