diff options
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r-- | clang/lib/Lex/Pragma.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp index d4c5c6b8359..0e0841da9a9 100644 --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/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(); } |