[PATCH] D56641: NFC: Move dumping of QualType node to TextNodeDumper
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 14 12:19:20 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL351116: [ASTDump] NFC: Move dumping of QualType node to TextNodeDumper (authored by steveire, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56641/new/
https://reviews.llvm.org/D56641
Files:
cfe/trunk/include/clang/AST/TextNodeDumper.h
cfe/trunk/lib/AST/ASTDumper.cpp
cfe/trunk/lib/AST/TextNodeDumper.cpp
Index: cfe/trunk/include/clang/AST/TextNodeDumper.h
===================================================================
--- cfe/trunk/include/clang/AST/TextNodeDumper.h
+++ cfe/trunk/include/clang/AST/TextNodeDumper.h
@@ -161,6 +161,8 @@
void Visit(const Type *T);
+ void Visit(QualType T);
+
void dumpPointer(const void *Ptr);
void dumpLocation(SourceLocation Loc);
void dumpSourceRange(SourceRange R);
Index: cfe/trunk/lib/AST/TextNodeDumper.cpp
===================================================================
--- cfe/trunk/lib/AST/TextNodeDumper.cpp
+++ cfe/trunk/lib/AST/TextNodeDumper.cpp
@@ -172,6 +172,14 @@
OS << " imported";
}
+void TextNodeDumper::Visit(QualType T) {
+ OS << "QualType";
+ dumpPointer(T.getAsOpaquePtr());
+ OS << " ";
+ dumpBareType(T, false);
+ OS << " " << T.split().Quals.getAsString();
+}
+
void TextNodeDumper::dumpPointer(const void *Ptr) {
ColorScope Color(OS, ShowColors, AddressColor);
OS << ' ' << Ptr;
Index: cfe/trunk/lib/AST/ASTDumper.cpp
===================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp
+++ cfe/trunk/lib/AST/ASTDumper.cpp
@@ -422,11 +422,7 @@
return dumpTypeAsChild(SQT.Ty);
dumpChild([=] {
- OS << "QualType";
- NodeDumper.dumpPointer(T.getAsOpaquePtr());
- OS << " ";
- NodeDumper.dumpBareType(T, false);
- OS << " " << T.split().Quals.getAsString();
+ NodeDumper.Visit(T);
dumpTypeAsChild(T.split().Ty);
});
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56641.181628.patch
Type: text/x-patch
Size: 1489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190114/d4419968/attachment.bin>
More information about the cfe-commits
mailing list