Use AstNode::addHereThisAsNext in a few places

This commit is contained in:
Geza Lore
2022-07-13 13:57:00 +01:00
parent e0a38ce2c2
commit 3fc8249429
3 changed files with 3 additions and 12 deletions
+1 -4
View File
@@ -68,10 +68,7 @@ private:
// Put assignment before the referencing statement
AstAssign* const assp = new AstAssign{
nodep->fileline(), new AstVarRef{nodep->fileline(), varp, VAccess::WRITE}, nodep};
VNRelinker linker2;
m_stmtp->unlinkFrBack(&linker2);
assp->addNext(m_stmtp);
linker2.relink(assp);
m_stmtp->addHereThisAsNext(assp);
}
// VISITORS