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
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp
index d4c5c6b..0e0841d 100644
--- a/lib/Lex/Pragma.cpp
+++ b/lib/Lex/Pragma.cpp
@@ -193,8 +193,9 @@
 }
 
 void Preprocessor::HandlePragmaMark() {
-  assert(CurLexer && "No current lexer?");
-  CurLexer->ReadToEndOfLine();
+  assert(CurPPLexer && "No current lexer?");
+  if (CurLexer) CurLexer->ReadToEndOfLine();
+  else CurPTHLexer->DiscardToEndOfLine();
 }