Add AstNode::foreach method for simple pre-order traversal (#3276)

This commit is contained in:
Geza Lore
2022-01-09 22:34:10 +00:00
committed by GitHub
parent 50094ca296
commit 64a6e1ac8b
15 changed files with 207 additions and 317 deletions
+1 -3
View File
@@ -82,7 +82,6 @@
#include "V3Ast.h"
#include "V3AstUserAllocator.h"
#include "V3Const.h"
#include "V3EmitCBase.h"
#include "V3EmitV.h"
#include "V3File.h"
#include "V3Global.h"
@@ -1831,8 +1830,7 @@ AstActive* OrderProcess::processMoveOneLogic(const OrderLogicVertex* lvertexp,
newFuncpr->addStmtsp(nodep);
if (v3Global.opt.outputSplitCFuncs()) {
// Add in the number of nodes we're adding
const EmitCBaseCounterVisitor visitor{nodep};
newStmtsr += visitor.count();
newStmtsr += nodep->nodeCount();
}
}