]> granicus.if.org Git - clang/commitdiff
[driver] For consistency, handle all shell special characters handled by the
authorChad Rosier <mcrosier@apple.com>
Wed, 5 Oct 2011 20:09:11 +0000 (20:09 +0000)
committerChad Rosier <mcrosier@apple.com>
Wed, 5 Oct 2011 20:09:11 +0000 (20:09 +0000)
quoting code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141205 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Compilation.cpp

index 7a62fa4b55f547ad4f88510910fce54e35a8cb94..baaba19ed72b32de5f1d0659b13b7502f2121950 100644 (file)
@@ -72,7 +72,7 @@ const DerivedArgList &Compilation::getArgsForToolChain(const ToolChain *TC,
 
 static bool needsQuote(const char *s) {
   for (const char *c = s; *c; ++c)
-    if (*c == ' ')
+    if (*c == ' ' || *c == '"' || *c == '\\' || *c == '$')
       return true;
   return false;
 }