r352656 - [ASTDump] NFC: Inline vestigial methods
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 30 11:41:04 PST 2019
Author: steveire
Date: Wed Jan 30 11:41:04 2019
New Revision: 352656
URL: http://llvm.org/viewvc/llvm-project?rev=352656&view=rev
Log:
[ASTDump] NFC: Inline vestigial methods
This was a porting aid.
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=352656&r1=352655&r2=352656&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Wed Jan 30 11:41:04 2019
@@ -57,14 +57,6 @@ namespace {
const bool ShowColors;
- /// Dump a child of the current node.
- template<typename Fn> void dumpChild(Fn DoDumpChild) {
- NodeDumper.AddChild(DoDumpChild);
- }
- template <typename Fn> void dumpChild(StringRef Label, Fn DoDumpChild) {
- NodeDumper.AddChild(Label, DoDumpChild);
- }
-
public:
ASTDumper(raw_ostream &OS, const CommandTraits *Traits,
const SourceManager *SM)
@@ -306,14 +298,14 @@ void ASTDumper::dumpTypeAsChild(QualType
if (!SQT.Quals.hasQualifiers())
return dumpTypeAsChild(SQT.Ty);
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(T);
dumpTypeAsChild(T.split().Ty);
});
}
void ASTDumper::dumpTypeAsChild(const Type *T) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(T);
if (!T)
return;
@@ -335,7 +327,7 @@ void ASTDumper::dumpDeclContext(const De
}
void ASTDumper::dumpLookups(const DeclContext *DC, bool DumpDecls) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
OS << "StoredDeclsMap ";
NodeDumper.dumpBareDeclRef(cast<Decl>(DC));
@@ -354,7 +346,7 @@ void ASTDumper::dumpLookups(const DeclCo
DeclarationName Name = I.getLookupName();
DeclContextLookupResult R = *I;
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
OS << "DeclarationName ";
{
ColorScope Color(OS, ShowColors, DeclNameColor);
@@ -363,7 +355,7 @@ void ASTDumper::dumpLookups(const DeclCo
for (DeclContextLookupResult::iterator RI = R.begin(), RE = R.end();
RI != RE; ++RI) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.dumpBareDeclRef(*RI);
if ((*RI)->isHidden())
@@ -385,7 +377,7 @@ void ASTDumper::dumpLookups(const DeclCo
}
if (HasUndeserializedLookups) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
ColorScope Color(OS, ShowColors, UndeserializedColor);
OS << "<undeserialized lookups>";
});
@@ -394,7 +386,7 @@ void ASTDumper::dumpLookups(const DeclCo
}
void ASTDumper::dumpAttr(const Attr *A) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(A);
ConstAttrVisitor<ASTDumper>::Visit(A);
});
@@ -405,7 +397,7 @@ void ASTDumper::dumpAttr(const Attr *A)
//===----------------------------------------------------------------------===//
void ASTDumper::dumpCXXCtorInitializer(const CXXCtorInitializer *Init) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(Init);
dumpStmt(Init->getInit());
});
@@ -437,7 +429,7 @@ void ASTDumper::dumpTemplateArgumentList
void ASTDumper::dumpTemplateArgument(const TemplateArgument &A, SourceRange R,
const Decl *From, const char *Label) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(A, R, From, Label);
ConstTemplateArgumentVisitor<ASTDumper>::Visit(A);
});
@@ -460,7 +452,7 @@ void ASTDumper::dumpObjCTypeParamList(co
//===----------------------------------------------------------------------===//
void ASTDumper::dumpDecl(const Decl *D) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(D);
if (!D)
return;
@@ -741,7 +733,7 @@ void ASTDumper::VisitObjCImplementationD
}
void ASTDumper::Visit(const BlockDecl::Capture &C) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(C);
if (C.hasCopyExpr())
dumpStmt(C.getCopyExpr());
@@ -762,7 +754,7 @@ void ASTDumper::VisitBlockDecl(const Blo
//===----------------------------------------------------------------------===//
void ASTDumper::dumpStmt(const Stmt *S, StringRef Label) {
- dumpChild(Label, [=] {
+ NodeDumper.AddChild(Label, [=] {
NodeDumper.Visit(S);
if (!S) {
@@ -804,7 +796,7 @@ void ASTDumper::VisitCapturedStmt(const
//===----------------------------------------------------------------------===//
void ASTDumper::Visit(const OMPClause *C) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(C);
for (const auto *S : C->children())
dumpStmt(S);
@@ -838,7 +830,7 @@ void ASTDumper::VisitOpaqueValueExpr(con
}
void ASTDumper::Visit(const GenericSelectionExpr::ConstAssociation &A) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(A);
if (const TypeSourceInfo *TSI = A.getTypeSourceInfo())
dumpTypeAsChild(TSI->getType());
@@ -879,7 +871,7 @@ void ASTDumper::VisitObjCAtCatchStmt(con
//===----------------------------------------------------------------------===//
void ASTDumper::dumpComment(const Comment *C, const FullComment *FC) {
- dumpChild([=] {
+ NodeDumper.AddChild([=] {
NodeDumper.Visit(C, FC);
if (!C) {
return;
More information about the cfe-commits
mailing list