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 | 19d78b743f805c5b89c8f6ae644c4cbb9c5f924e (patch) | |
tree | 9b97f869331285376c32b1201a48e635407f7014 /clang/lib/Lex/Preprocessor.cpp | |
parent | 43af5132c51d1dc592132488d1d8afe79057897c (diff) | |
download | bcm5719-llvm-19d78b743f805c5b89c8f6ae644c4cbb9c5f924e.tar.gz bcm5719-llvm-19d78b743f805c5b89c8f6ae644c4cbb9c5f924e.zip |
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.
llvm-svn: 164874
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 9fa3aabe4c8..872cda390aa 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/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) { |