[PATCH] D41785: Print the qualified name when dumping deserialized decls.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 5 14:03:59 PST 2018


v.g.vassilev created this revision.
v.g.vassilev added a reviewer: rsmith.

This is very useful to understand and debug the lazy template specializations used in pch and modules.


Repository:
  rC Clang

https://reviews.llvm.org/D41785

Files:
  lib/Frontend/FrontendAction.cpp


Index: lib/Frontend/FrontendAction.cpp
===================================================================
--- lib/Frontend/FrontendAction.cpp
+++ lib/Frontend/FrontendAction.cpp
@@ -88,8 +88,10 @@
 
   void DeclRead(serialization::DeclID ID, const Decl *D) override {
     llvm::outs() << "PCH DECL: " << D->getDeclKindName();
-    if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
-      llvm::outs() << " - " << *ND;
+    if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
+      llvm::outs() << " - ";
+      ND->printQualifiedName(llvm::outs());
+    }
     llvm::outs() << "\n";
 
     DelegatingDeserializationListener::DeclRead(ID, D);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41785.128791.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180105/2bf24b2c/attachment.bin>


More information about the cfe-commits mailing list