From 1986e6247720d2689583ba82dca0a001b3c43dfa Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 21 Nov 2023 22:32:13 -0500 Subject: [PATCH] Internals: Remove unused append dumpTreeFile option --- src/V3Ast.cpp | 8 ++++---- src/V3Ast.h | 5 ++--- src/V3Global.cpp | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 139aeb0de..e97badfb7 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -1273,12 +1273,12 @@ void AstNode::dumpTreeAndNext(std::ostream& os, const string& indent, int maxDep } } -void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, bool doCheck) { +void AstNode::dumpTreeFile(const string& filename, bool doDump, bool doCheck) { // Not const function as calls checkTree if (doDump) { { // Write log & close UINFO(2, "Dumping " << filename << endl); - const std::unique_ptr logsp{V3File::new_ofstream(filename, append)}; + const std::unique_ptr logsp{V3File::new_ofstream(filename)}; if (logsp->fail()) v3fatal("Can't write " << filename); *logsp << "Verilator Tree Dump (format 0x3900) from to \n"; @@ -1328,10 +1328,10 @@ void AstNode::dumpTreeDot(std::ostream& os) const { drawChildren(os, this, m_op4p, "op4"); } -void AstNode::dumpTreeDotFile(const string& filename, bool append, bool doDump) { +void AstNode::dumpTreeDotFile(const string& filename, bool doDump) { if (doDump) { UINFO(2, "Dumping " << filename << endl); - const std::unique_ptr treedotp{V3File::new_ofstream(filename, append)}; + const std::unique_ptr treedotp{V3File::new_ofstream(filename)}; if (treedotp->fail()) v3fatal("Can't write " << filename); *treedotp << "digraph vTree{\n"; *treedotp << "\tgraph\t[label=\"" << filename + ".dot" diff --git a/src/V3Ast.h b/src/V3Ast.h index fc255d933..f1755b171 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -2211,11 +2211,10 @@ public: static void dumpTreeGdb(const AstNode* nodep); // For GDB only void dumpTreeAndNext(std::ostream& os = std::cout, const string& indent = " ", int maxDepth = 0) const; - void dumpTreeFile(const string& filename, bool append = false, bool doDump = true, - bool doCheck = true); + void dumpTreeFile(const string& filename, bool doDump = true, bool doCheck = true); static void dumpTreeFileGdb(const AstNode* nodep, const char* filenamep = nullptr); void dumpTreeDot(std::ostream& os = std::cout) const; - void dumpTreeDotFile(const string& filename, bool append = false, bool doDump = true); + void dumpTreeDotFile(const string& filename, bool doDump = true); // METHODS - static advancement static AstNode* afterCommentp(AstNode* nodep) { diff --git a/src/V3Global.cpp b/src/V3Global.cpp index 454787fe9..3b1a3487c 100644 --- a/src/V3Global.cpp +++ b/src/V3Global.cpp @@ -106,9 +106,9 @@ string V3Global::digitsFilename(int number) { void V3Global::dumpCheckGlobalTree(const string& stagename, int newNumber, bool doDump) { const string treeFilename = v3Global.debugFilename(stagename + ".tree", newNumber); - v3Global.rootp()->dumpTreeFile(treeFilename, false, doDump); + v3Global.rootp()->dumpTreeFile(treeFilename, doDump); if (v3Global.opt.dumpTreeDot()) { - v3Global.rootp()->dumpTreeDotFile(treeFilename + ".dot", false, doDump); + v3Global.rootp()->dumpTreeDotFile(treeFilename + ".dot", doDump); } if (v3Global.opt.stats()) V3Stats::statsStage(stagename); }