aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 5f2a963..240305b 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -427,12 +427,8 @@ static void InitializeFileRemapping(DiagnosticsEngine &Diags,
}
// Create the file entry for the file that we're mapping from.
- const FileEntry *FromFile =
- FileMgr.getVirtualFile(RF.first, ToFile->getSize(), 0);
- if (!FromFile) {
- Diags.Report(diag::err_fe_remap_missing_from_file) << RF.first;
- continue;
- }
+ FileEntryRef FromFile =
+ FileMgr.getVirtualFileRef(RF.first, ToFile->getSize(), 0);
// Override the contents of the "from" file with the contents of
// the "to" file.
@@ -1926,7 +1922,7 @@ ModuleLoadResult CompilerInstance::findOrCompileModuleAndReadAST(
// Check whether M refers to the file in the prebuilt module path.
if (M && M->getASTFile())
- if (auto ModuleFile = FileMgr->getFile(ModuleFilename))
+ if (auto ModuleFile = FileMgr->getOptionalFileRef(ModuleFilename))
if (*ModuleFile == M->getASTFile())
return M;