r348718 - Revert "Introduce optional labels to dumpStmt"

Stephen Kelly via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 9 05:24:40 PST 2018


Author: steveire
Date: Sun Dec  9 05:24:40 2018
New Revision: 348718

URL: http://llvm.org/viewvc/llvm-project?rev=348718&view=rev
Log:
Revert "Introduce optional labels to dumpStmt"

This reverts commit 933402caa09963792058198578522a95f013c69c.

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=348718&r1=348717&r2=348718&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Sun Dec  9 05:24:40 2018
@@ -83,8 +83,7 @@ namespace  {
     void setDeserialize(bool D) { Deserialize = D; }
 
     void dumpDecl(const Decl *D);
-    void dumpStmt(const Stmt *S, const char *label = nullptr);
-    void dumpStmtImpl(const Stmt *S);
+    void dumpStmt(const Stmt *S);
 
     // Utilities
     void dumpType(QualType T) { NodeDumper.dumpType(T); }
@@ -1712,18 +1711,7 @@ void ASTDumper::VisitBlockDecl(const Blo
 //  Stmt dumping methods.
 //===----------------------------------------------------------------------===//
 
-void ASTDumper::dumpStmt(const Stmt *S, const char *label) {
-  if (label) {
-    dumpChild([=] {
-      OS << label;
-      dumpStmtImpl(S);
-    });
-  } else {
-    dumpStmtImpl(S);
-  }
-}
-
-void ASTDumper::dumpStmtImpl(const Stmt *S) {
+void ASTDumper::dumpStmt(const Stmt *S) {
   dumpChild([=] {
     if (!S) {
       ColorScope Color(OS, ShowColors, NullColor);
@@ -1990,7 +1978,10 @@ void ASTDumper::VisitInitListExpr(const
     NodeDumper.dumpBareDeclRef(Field);
   }
   if (auto *Filler = ILE->getArrayFiller()) {
-    dumpStmt(Filler, "array filler");
+    dumpChild([=] {
+      OS << "array filler";
+      dumpStmt(Filler);
+    });
   }
 }
 




More information about the cfe-commits mailing list