Do not use function locals in SenExprBuilder (#5822)

Function locals are not safe here because we might need to split up
the generated function. V3Localize can fix them later if safe.
This commit is contained in:
Geza Lore
2025-03-02 16:13:59 +00:00
committed by GitHub
parent bab949a468
commit 0133bc6b09
5 changed files with 24 additions and 51 deletions
-8
View File
@@ -752,14 +752,6 @@ const TriggerKit createTriggers(AstNetlist* netlistp, AstCFunc* const initFuncp,
funcp->stmtsp()->addHereThisAsNext(nodep);
}
}
const auto& locals = senExprBuilder.getAndClearLocals();
if (!locals.empty()) {
UASSERT_OBJ(funcp->stmtsp(), funcp,
"No statements in trigger eval function, but there are locals");
for (AstVar* const nodep : vlstd::reverse_view(locals)) {
funcp->stmtsp()->addHereThisAsNext(nodep);
}
}
// Add the initialization statements
if (initialTrigsp) {