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:
Richard Smith
2015-01-23 00:01:13 +00:00
parent 5f715d36a7
commit ac425e9165
3 changed files with 17 additions and 8 deletions

View File

@@ -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