diff options
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | lib/Lex/PPLexerChange.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index cc8ccc4c10..60d42386d7 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -74,16 +74,10 @@ void Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir) { MaxIncludeStackDepth = IncludeMacroStack.size(); if (PTH) { - PTHLexer *PL = PTH->CreateLexer(FID, SourceMgr.getFileEntryForID(FID)); - - if (PL) { - EnterSourceFileWithPTH(PL, CurDir); - return; - } + if (PTHLexer *PL = PTH->CreateLexer(FID, SourceMgr.getFileEntryForID(FID))) + return EnterSourceFileWithPTH(PL, CurDir); } - - Lexer *TheLexer = new Lexer(SourceMgr.getLocForStartOfFile(FID), *this); - EnterSourceFileWithLexer(TheLexer, CurDir); + EnterSourceFileWithLexer(new Lexer(FID, *this), CurDir); } /// EnterSourceFileWithLexer - Add a source file to the top of the include stack |