PR22299: Relocate code for handling -fmodule-map-file= so that we don't try to
produce diagnostics with source locations before the diagnostics system is ready for them. llvm-svn: 226882
This commit is contained in:
@@ -371,14 +371,6 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
|
||||
AttachHeaderIncludeGen(*PP, /*ShowAllHeaders=*/false, /*OutputPath=*/"",
|
||||
/*ShowDepth=*/true, /*MSStyle=*/true);
|
||||
}
|
||||
|
||||
// Load all explictly-specified module map files.
|
||||
for (const auto &Filename : getFrontendOpts().ModuleMapFiles) {
|
||||
if (auto *File = getFileManager().getFile(Filename))
|
||||
PP->getHeaderSearchInfo().loadModuleMapFile(File, /*IsSystem*/false);
|
||||
else
|
||||
getDiagnostics().Report(diag::err_module_map_not_found) << Filename;
|
||||
}
|
||||
}
|
||||
|
||||
// ASTContext
|
||||
|
||||
Reference in New Issue
Block a user