Make sure to escape " when it occurs in a string in pragma comment

llvm-svn: 62367
This commit is contained in:
Chris Lattner
2009-01-16 22:13:37 +00:00
parent 5f8a2598b2
commit dde6eb34bb

View File

@@ -209,7 +209,7 @@ void PrintPPOutputPPCallbacks::PragmaComment(SourceLocation Loc,
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 << '\\'