Internals: Add missing VL_DO_DANGLING. No functional change intended.

This commit is contained in:
Wilson Snyder
2024-05-08 08:36:24 -04:00
parent 2a9f29912c
commit 1cc37ad6ce
16 changed files with 23 additions and 31 deletions
+2 -3
View File
@@ -204,8 +204,7 @@ class UnrollVisitor final : public VNVisitor {
iterateAndNextNull(tempp->stmtsp());
m_varModeReplace = false;
clonep = tempp->stmtsp()->unlinkFrBackWithNext();
tempp->deleteTree();
tempp = nullptr;
VL_DO_CLEAR(tempp->deleteTree(), tempp = nullptr);
VL_DO_CLEAR(pushDeletep(m_varValuep), m_varValuep = nullptr);
}
SimulateVisitor simvis;
@@ -456,7 +455,7 @@ class UnrollVisitor final : public VNVisitor {
&& nodep->access().isReadOnly()) {
AstNode* const newconstp = m_varValuep->cloneTree(false);
nodep->replaceWith(newconstp);
pushDeletep(nodep);
VL_DO_DANGLING(pushDeletep(nodep), nodep);
}
}