From dde6eb34bb5d6193bf186ba21e280fe702f75bb2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 16 Jan 2009 22:13:37 +0000 Subject: [PATCH] Make sure to escape " when it occurs in a string in pragma comment llvm-svn: 62367 --- clang/Driver/PrintPreprocessedOutput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/Driver/PrintPreprocessedOutput.cpp b/clang/Driver/PrintPreprocessedOutput.cpp index 9fc37d9f51f1..64cc4c8be65b 100644 --- a/clang/Driver/PrintPreprocessedOutput.cpp +++ b/clang/Driver/PrintPreprocessedOutput.cpp @@ -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 << '\\'