mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Internals: Add cloneTreePure to prepare for side effect check.
Use cloneTreePure when what is being cloned must be side-effect free. Use cloneTree when safe to contain side effects (e.g. cloning module).
This commit is contained in:
+1
-1
@@ -292,7 +292,7 @@ private:
|
||||
}
|
||||
void replaceSubstEtc(AstNode* nodep, AstNodeExpr* substp) {
|
||||
if (debug() > 5) nodep->dumpTree("- substw_old: ");
|
||||
AstNodeExpr* newp = substp->cloneTree(true);
|
||||
AstNodeExpr* newp = substp->cloneTreePure(true);
|
||||
if (!nodep->isQuad() && newp->isQuad()) {
|
||||
newp = new AstCCast{newp->fileline(), newp, nodep};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user