diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2018-09-11 05:17:13 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2018-09-11 05:17:13 +0000 |
commit | 6fc8a564cffd197f34572831640936b90648f9dc (patch) | |
tree | 44ac1ec30bb7d28417310d9e993fe00b4e01b96a /clang/lib/Frontend/FrontendActions.cpp | |
parent | 90edc98c588794b6a133a3b14c971ad50fa58471 (diff) | |
download | bcm5719-llvm-6fc8a564cffd197f34572831640936b90648f9dc.tar.gz bcm5719-llvm-6fc8a564cffd197f34572831640936b90648f9dc.zip |
[Modules] Add imported modules to the output of -module-file-info
Fix a bug in the deserialization of IMPORTS section and allow for
imported modules to also be printed with -module-file-info.
rdar://problem/43867753
llvm-svn: 341902
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 342081eba67..40008bf3cdd 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -601,6 +601,17 @@ namespace { return true; } + + /// Returns true if this \c ASTReaderListener wants to receive the + /// imports of the AST file via \c visitImport, false otherwise. + bool needsImportVisitation() const override { return true; } + + /// If needsImportVisitation returns \c true, this is called for each + /// AST file imported by this AST file. + void visitImport(StringRef ModuleName, StringRef Filename) override { + Out.indent(2) << "Imports module '" << ModuleName + << "': " << Filename.str() << "\n"; + } #undef DUMP_BOOLEAN }; } |