aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-12-14 22:04:41 -0500
committerNico Weber <thakis@chromium.org>2020-12-14 22:05:08 -0500
commit7799ef7121aa7d59f4bd95cdf70035de724ead6f (patch)
tree40636554c805435ee0c8c9862116f3a0f20c3799 /clang/lib/Frontend/FrontendAction.cpp
parentc9ede6f3367a627baeef78f30d18078af9a4ffca (diff)
downloadllvm-7799ef7121aa7d59f4bd95cdf70035de724ead6f.zip
llvm-7799ef7121aa7d59f4bd95cdf70035de724ead6f.tar.gz
llvm-7799ef7121aa7d59f4bd95cdf70035de724ead6f.tar.bz2
Revert "Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef"
This reverts commit a40db5502b2515a6f2f1676b5d7a655ae0f41179. and follow-up d636b881bb9214938973098a012fad453082c444 Somewhat speculative, likely broke check-clang on Windows: https://reviews.llvm.org/D92975#2453482
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index d3891eb..2317873 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -432,7 +432,7 @@ static bool loadModuleMapForModuleBuild(CompilerInstance &CI, bool IsSystem,
// Map the current input to a file.
FileID ModuleMapID = SrcMgr.getMainFileID();
- Optional<FileEntryRef> ModuleMap = SrcMgr.getFileEntryRefForID(ModuleMapID);
+ const FileEntry *ModuleMap = SrcMgr.getFileEntryForID(ModuleMapID);
// If the module map is preprocessed, handle the initial line marker;
// line directives are not part of the module map syntax in general.
@@ -445,7 +445,7 @@ static bool loadModuleMapForModuleBuild(CompilerInstance &CI, bool IsSystem,
}
// Load the module map file.
- if (HS.loadModuleMapFile(*ModuleMap, IsSystem, ModuleMapID, &Offset,
+ if (HS.loadModuleMapFile(ModuleMap, IsSystem, ModuleMapID, &Offset,
PresumedModuleMapFile))
return true;
@@ -807,7 +807,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
// If we were asked to load any module map files, do so now.
for (const auto &Filename : CI.getFrontendOpts().ModuleMapFiles) {
- if (auto File = CI.getFileManager().getOptionalFileRef(Filename))
+ if (auto File = CI.getFileManager().getFile(Filename))
CI.getPreprocessor().getHeaderSearchInfo().loadModuleMapFile(
*File, /*IsSystem*/false);
else