diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:13:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-16 22:13:37 +0000 |
commit | dde6eb34bb5d6193bf186ba21e280fe702f75bb2 (patch) | |
tree | f0f994d8bca802584753641c9b6a7f137acfc33b /clang | |
parent | 5f8a2598b29d996f980594f79f74564e6b89c34e (diff) | |
download | bcm5719-llvm-dde6eb34bb5d6193bf186ba21e280fe702f75bb2.tar.gz bcm5719-llvm-dde6eb34bb5d6193bf186ba21e280fe702f75bb2.zip |
Make sure to escape " when it occurs in a string in pragma comment
llvm-svn: 62367
Diffstat (limited to 'clang')
-rw-r--r-- | clang/Driver/PrintPreprocessedOutput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Driver/PrintPreprocessedOutput.cpp b/clang/Driver/PrintPreprocessedOutput.cpp index 9fc37d9f51f..64cc4c8be65 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 << '\\' |