r240313 - [modules] Include merged definition information in AST dumps.
Richard Smith
richard-llvm at metafoo.co.uk
Mon Jun 22 11:47:01 PDT 2015
Author: rsmith
Date: Mon Jun 22 13:47:01 2015
New Revision: 240313
URL: http://llvm.org/viewvc/llvm-project?rev=240313&view=rev
Log:
[modules] Include merged definition information in AST dumps.
Modified:
cfe/trunk/lib/AST/ASTDumper.cpp
Modified: cfe/trunk/lib/AST/ASTDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDumper.cpp?rev=240313&r1=240312&r2=240313&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Mon Jun 22 13:47:01 2015
@@ -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";
More information about the cfe-commits
mailing list