summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-06-22 18:47:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-06-22 18:47:01 +0000
commit804572cf4c966269ca379ddb9e78f754562104af (patch)
tree3533b62377ba45f60f814f5aba9e0460b918b76e
parent51ef4b95aad99852e704dea9c172f72df4ecb5d1 (diff)
downloadclang-804572cf4c966269ca379ddb9e78f754562104af.tar.gz
[modules] Include merged definition information in AST dumps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240313 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/ASTDumper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp
index 6b4a078734..4da6240f86 100644
--- a/lib/AST/ASTDumper.cpp
+++ b/lib/AST/ASTDumper.cpp
@@ -981,6 +981,10 @@ void ASTDumper::dumpDecl(const Decl *D) {
OS << " in " << M->getFullModuleName();
else if (Module *M = D->getLocalOwningModule())
OS << " in (local) " << M->getFullModuleName();
+ if (auto *ND = dyn_cast<NamedDecl>(D))
+ for (Module *M : D->getASTContext().getModulesWithMergedDefinition(
+ const_cast<NamedDecl *>(ND)))
+ dumpChild([=] { OS << "also in " << M->getFullModuleName(); });
if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
if (ND->isHidden())
OS << " hidden";