forked from OSchip/llvm-project
Replace SM.getFileEntryForID(Lexer->getFileID()) with Lexer->getFileEntry().
llvm-svn: 255993
This commit is contained in:
parent
6f531ec0a2
commit
6522461080
|
@ -650,8 +650,7 @@ const FileEntry *Preprocessor::LookupFile(
|
|||
for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {
|
||||
IncludeStackInfo &ISEntry = IncludeMacroStack[e - i - 1];
|
||||
if (IsFileLexer(ISEntry))
|
||||
if ((FileEnt = SourceMgr.getFileEntryForID(
|
||||
ISEntry.ThePPLexer->getFileID())))
|
||||
if ((FileEnt = ISEntry.ThePPLexer->getFileEntry()))
|
||||
Includers.push_back(std::make_pair(FileEnt, FileEnt->getDir()));
|
||||
}
|
||||
}
|
||||
|
@ -696,7 +695,7 @@ const FileEntry *Preprocessor::LookupFile(
|
|||
// to one of the headers on the #include stack. Walk the list of the current
|
||||
// headers on the #include stack and pass them to HeaderInfo.
|
||||
if (IsFileLexer()) {
|
||||
if ((CurFileEnt = SourceMgr.getFileEntryForID(CurPPLexer->getFileID()))) {
|
||||
if ((CurFileEnt = CurPPLexer->getFileEntry())) {
|
||||
if ((FE = HeaderInfo.LookupSubframeworkHeader(Filename, CurFileEnt,
|
||||
SearchPath, RelativePath,
|
||||
RequestingModule,
|
||||
|
@ -712,8 +711,7 @@ const FileEntry *Preprocessor::LookupFile(
|
|||
for (unsigned i = 0, e = IncludeMacroStack.size(); i != e; ++i) {
|
||||
IncludeStackInfo &ISEntry = IncludeMacroStack[e-i-1];
|
||||
if (IsFileLexer(ISEntry)) {
|
||||
if ((CurFileEnt =
|
||||
SourceMgr.getFileEntryForID(ISEntry.ThePPLexer->getFileID()))) {
|
||||
if ((CurFileEnt = ISEntry.ThePPLexer->getFileEntry())) {
|
||||
if ((FE = HeaderInfo.LookupSubframeworkHeader(
|
||||
Filename, CurFileEnt, SearchPath, RelativePath,
|
||||
RequestingModule, SuggestedModule))) {
|
||||
|
|
|
@ -301,8 +301,7 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
|
|||
if (const IdentifierInfo *ControllingMacro =
|
||||
CurPPLexer->MIOpt.GetControllingMacroAtEndOfFile()) {
|
||||
// Okay, this has a controlling macro, remember in HeaderFileInfo.
|
||||
if (const FileEntry *FE =
|
||||
SourceMgr.getFileEntryForID(CurPPLexer->getFileID())) {
|
||||
if (const FileEntry *FE = CurPPLexer->getFileEntry()) {
|
||||
HeaderInfo.SetFileControllingMacro(FE, ControllingMacro);
|
||||
if (MacroInfo *MI =
|
||||
getMacroInfo(const_cast<IdentifierInfo*>(ControllingMacro))) {
|
||||
|
|
Loading…
Reference in New Issue