diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-19 22:21:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-19 22:21:33 +0000 |
commit | 17ff58a63197b398ae52697b088dc0fb8b255519 (patch) | |
tree | 3ec5398531f63a338509278b9d8ce6861047a0b0 /lib/Lex/Pragma.cpp | |
parent | 41938c8493b4380df738263166b746eacb33c309 (diff) |
When using a PTHLexer, use DiscardToEndOfLine() instead of ReadToEndOfLine().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59668 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index d4c5c6b835..0e0841da9a 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -193,8 +193,9 @@ void Preprocessor::HandlePragmaOnce(Token &OnceTok) { } void Preprocessor::HandlePragmaMark() { - assert(CurLexer && "No current lexer?"); - CurLexer->ReadToEndOfLine(); + assert(CurPPLexer && "No current lexer?"); + if (CurLexer) CurLexer->ReadToEndOfLine(); + else CurPTHLexer->DiscardToEndOfLine(); } |