[cfe-commits] r62367 - /cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Chris Lattner sabre at nondot.org
Fri Jan 16 14:13:38 PST 2009


Author: lattner
Date: Fri Jan 16 16:13:37 2009
New Revision: 62367

URL: http://llvm.org/viewvc/llvm-project?rev=62367&view=rev
Log:
Make sure to escape " when it occurs in a string in pragma comment

Modified:
    cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=62367&r1=62366&r2=62367&view=diff

==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Fri Jan 16 16:13:37 2009
@@ -209,7 +209,7 @@
     
     for (unsigned i = 0, e = Str.size(); i != e; ++i) {
       unsigned char Char = Str[i];
-      if (isprint(Char) && Char != '\\')
+      if (isprint(Char) && Char != '\\' && Char != '"')
         OS << (char)Char;
       else  // Output anything hard as an octal escape.
         OS << '\\'





More information about the cfe-commits mailing list