/// CreateLexer - Return a PTHLexer that "lexes" the cached tokens for the
/// specified file. This method returns NULL if no cached tokens exist.
/// It is the responsibility of the caller to 'delete' the returned object.
- PTHLexer *CreateLexer(FileID FID, const FileEntry *FE);
+ PTHLexer *CreateLexer(FileID FID);
unsigned getSpelling(SourceLocation Loc, const char *&Buffer);
private:
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);
}
-PTHLexer* PTHManager::CreateLexer(FileID FID, const FileEntry* FE) {
+PTHLexer *PTHManager::CreateLexer(FileID FID) {
+ const FileEntry *FE = PP->getSourceManager().getFileEntryForID(FID);
if (!FE)
return 0;