diff options
author | Reid Kleckner <rnk@google.com> | 2018-09-11 21:02:03 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-09-11 21:02:03 +0000 |
commit | 45265d996b4e8e9e138d7ee9d75c02ffe0149676 (patch) | |
tree | a3180e7078cadbb1c4cd13be01fa70f141d094e8 | |
parent | 443e20ba325b6f1c5ecf2cd2470fc3e72b887e9b (diff) | |
download | bcm5719-llvm-45265d996b4e8e9e138d7ee9d75c02ffe0149676.tar.gz bcm5719-llvm-45265d996b4e8e9e138d7ee9d75c02ffe0149676.zip |
[Support] Quote arguments containing \n on Windows
Fixes at_file.c test failure caused by r341988. We may want to change
how we treat \n in our tokenizer, but this is probably a good fix
regardless, since we can invoke all kinds of programs with different
interpretations of the command line quoting rules.
llvm-svn: 341992
-rw-r--r-- | llvm/lib/Support/Windows/Program.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/Program.inc b/llvm/lib/Support/Windows/Program.inc index cb68c5b10e5..88c56bc173b 100644 --- a/llvm/lib/Support/Windows/Program.inc +++ b/llvm/lib/Support/Windows/Program.inc @@ -317,7 +317,7 @@ static bool Execute(ProcessInfo &PI, StringRef Program, static bool argNeedsQuotes(StringRef Arg) { if (Arg.empty()) return true; - return StringRef::npos != Arg.find_first_of("\t \"&\'()*<>\\`^|"); + return StringRef::npos != Arg.find_first_of("\t \"&\'()*<>\\`^|\n"); } static std::string quoteSingleArg(StringRef Arg) { |