aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Lex/PPLexerChange.cpp2
-rw-r--r--lib/Lex/PTHLexer.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp
index 60d42386d7..f8c8636fcb 100644
--- a/lib/Lex/PPLexerChange.cpp
+++ b/lib/Lex/PPLexerChange.cpp
@@ -74,7 +74,7 @@ void Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir) {
MaxIncludeStackDepth = IncludeMacroStack.size();
if (PTH) {
- if (PTHLexer *PL = PTH->CreateLexer(FID, SourceMgr.getFileEntryForID(FID)))
+ if (PTHLexer *PL = PTH->CreateLexer(FID))
return EnterSourceFileWithPTH(PL, CurDir);
}
EnterSourceFileWithLexer(new Lexer(FID, *this), CurDir);
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index fd7c367c70..12f8330b20 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -668,7 +668,8 @@ IdentifierInfo* PTHManager::get(const char *NameStart, const char *NameEnd) {
}
-PTHLexer* PTHManager::CreateLexer(FileID FID, const FileEntry* FE) {
+PTHLexer *PTHManager::CreateLexer(FileID FID) {
+ const FileEntry *FE = PP->getSourceManager().getFileEntryForID(FID);
if (!FE)
return 0;