diff --git a/src/V3Active.cpp b/src/V3Active.cpp index 49b914e9e..91bfdefaf 100644 --- a/src/V3Active.cpp +++ b/src/V3Active.cpp @@ -283,7 +283,6 @@ private: m_namer.scopep()->addActivep(m_scopeFinalp); } nodep->unlinkFrBack(); - m_scopeFinalp->addStmtsp(new AstComment(nodep->fileline(), nodep->typeName(), true)); m_scopeFinalp->addStmtsp(nodep->bodysp()->unlinkFrBackWithNext()); VL_DO_DANGLING(nodep->deleteTree(), nodep); } diff --git a/src/V3Clock.cpp b/src/V3Clock.cpp index e4a5da09f..a21b85aef 100644 --- a/src/V3Clock.cpp +++ b/src/V3Clock.cpp @@ -294,31 +294,25 @@ private: m_scopep = nullptr; } virtual void visit(AstNodeProcedure* nodep) override { - AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName(), true); - nodep->replaceWith(cmtp); if (AstNode* stmtsp = nodep->bodysp()) { stmtsp->unlinkFrBackWithNext(); - cmtp->addNextHere(stmtsp); + nodep->addNextHere(stmtsp); } - VL_DO_DANGLING(nodep->deleteTree(), nodep); + VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep); } virtual void visit(AstAlwaysPost* nodep) override { - AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName(), true); - nodep->replaceWith(cmtp); if (AstNode* stmtsp = nodep->bodysp()) { stmtsp->unlinkFrBackWithNext(); - cmtp->addNextHere(stmtsp); + nodep->addNextHere(stmtsp); } - VL_DO_DANGLING(nodep->deleteTree(), nodep); + VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep); } virtual void visit(AstAlwaysPostponed* nodep) override { - AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName(), true); - nodep->replaceWith(cmtp); if (AstNode* stmtsp = nodep->bodysp()) { stmtsp->unlinkFrBackWithNext(); - cmtp->addNextHere(stmtsp); + nodep->addNextHere(stmtsp); } - VL_DO_DANGLING(nodep->deleteTree(), nodep); + VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep); } virtual void visit(AstCoverToggle* nodep) override { // nodep->dumpTree(cout, "ct:"); diff --git a/test_regress/t/t_debug_emitv.out b/test_regress/t/t_debug_emitv.out index 3ffe26269..50ed186bf 100644 --- a/test_regress/t/t_debug_emitv.out +++ b/test_regress/t/t_debug_emitv.out @@ -48,7 +48,6 @@ module Vt_debug_emitv; ???? // CFUNC '_final_TOP' $_CSTMT(Vt_debug_emitv* const __restrict vlTOPp VL_ATTR_UNUSED = vlSymsp->TOPp; ); - // FINAL $display("stmt"); always @(posedge clk)@(negedge clk) begin $display("posedge clk");