r193210 - Teach AST dumper to dump the containing module and hidden flag for declarations.

Richard Smith richard-llvm at metafoo.co.uk
Tue Oct 22 16:50:38 PDT 2013


Author: rsmith
Date: Tue Oct 22 18:50:38 2013
New Revision: 193210

URL: http://llvm.org/viewvc/llvm-project?rev=193210&view=rev
Log:
Teach AST dumper to dump the containing module and hidden flag for declarations.

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=193210&r1=193209&r2=193210&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Tue Oct 22 18:50:38 2013
@@ -552,6 +552,8 @@ void ASTDumper::dumpLookups(const DeclCo
       if (RI + 1 == RE)
         lastChild();
       dumpDeclRef(*RI);
+      if ((*RI)->isHidden())
+        OS << " hidden";
     }
   }
 
@@ -740,6 +742,11 @@ void ASTDumper::dumpDecl(const Decl *D)
     OS << " parent " << cast<Decl>(D->getDeclContext());
   dumpPreviousDecl(OS, D);
   dumpSourceRange(D->getSourceRange());
+  if (Module *M = D->getOwningModule())
+    OS << " in " << M->getFullModuleName();
+  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
+    if (ND->isHidden())
+      OS << " hidden";
 
   bool HasAttrs = D->attr_begin() != D->attr_end();
   const FullComment *Comment =





More information about the cfe-commits mailing list