diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-27 23:01:16 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-27 23:01:16 +0000 |
commit | d4b230b3780bf645991e99986a510124f64dabed (patch) | |
tree | 26b104f6557dfcff20421c588c21c50361fad1a7 /clang/lib/Frontend/FrontendAction.cpp | |
parent | 40d3ad33190d8f8bd74639705927556fcace5e7a (diff) | |
download | llvm-d4b230b3780bf645991e99986a510124f64dabed.zip llvm-d4b230b3780bf645991e99986a510124f64dabed.tar.gz llvm-d4b230b3780bf645991e99986a510124f64dabed.tar.bz2 |
[modules] Load .pcm files specified by -fmodule-file lazily.
llvm-svn: 220731
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 1c93842..c81c81a 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. |