diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-09-29 01:06:10 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-09-29 01:06:10 +0000 |
commit | f8afcffe6a0213760b64c211812b1750e1e1e967 (patch) | |
tree | 99f6628e78560ada79e11bbe7af546b3e5cac8b3 /lib/Lex/Preprocessor.cpp | |
parent | e2ac16b09ea66ad955752381b82fb8719d003e5e (diff) |
For PPCallbacks::InclusionDirective() add a parameter for the module, whenever
an inclusion directive was automatically turned into a module import, and
PPCallbacks::moduleImport() for an explicit module import.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 9fa3aabe4c..872cda390a 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -641,10 +641,14 @@ void Preprocessor::LexAfterModuleImport(Token &Result) { } // If we have a non-empty module path, load the named module. - if (!ModuleImportPath.empty()) - (void)TheModuleLoader.loadModule(ModuleImportLoc, ModuleImportPath, - Module::MacrosVisible, - /*IsIncludeDirective=*/false); + if (!ModuleImportPath.empty()) { + Module *Imported = TheModuleLoader.loadModule(ModuleImportLoc, + ModuleImportPath, + Module::MacrosVisible, + /*IsIncludeDirective=*/false); + if (Callbacks) + Callbacks->moduleImport(ModuleImportLoc, ModuleImportPath, Imported); + } } void Preprocessor::addCommentHandler(CommentHandler *Handler) { |