mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +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:
parent
1ab1d154d2
commit
172c29c1bc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user