summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 1c9384218ad..c81c81aba4d 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -383,16 +383,10 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
"doesn't support modules");
}
- // If we were asked to load any module files, do so now. Don't make any names
- // from those modules visible.
- for (const auto &ModuleFile : CI.getFrontendOpts().ModuleFiles) {
- // FIXME: Use a better source location here. Perhaps inject something
- // into the predefines buffer to represent these module files.
- if (!CI.loadModuleFile(ModuleFile,
- CI.getSourceManager().getLocForStartOfFile(
- CI.getSourceManager().getMainFileID())))
+ // If we were asked to load any module files, do so now.
+ for (const auto &ModuleFile : CI.getFrontendOpts().ModuleFiles)
+ if (!CI.loadModuleFile(ModuleFile))
goto failure;
- }
// If there is a layout overrides file, attach an external AST source that
// provides the layouts from that file.
OpenPOWER on IntegriCloud