1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

[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
This commit is contained in:
Reid Kleckner 2018-09-11 21:02:03 +00:00
parent 1ab1d154d2
commit 172c29c1bc

View File

@ -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) {