Optimize away empty ctor_var_reset.

Fixes #7154.
This commit is contained in:
Wilson Snyder
2026-03-23 18:10:34 -04:00
parent 06263ec724
commit 716b404256
11 changed files with 102 additions and 52 deletions
+2 -1
View File
@@ -1345,7 +1345,8 @@ class TaskVisitor final : public VNVisitor {
}
if (!isInterfaceClass) {
const string stmt = VIdProtect::protect("_ctor_var_reset") + "(vlSymsp);";
cfuncp->addStmtsp(new AstCStmt{nodep->fileline(), stmt});
cfuncp->addStmtsp(
new AstCStmt{nodep->fileline(), stmt, VCStmtType::CTOR_VAR_RESET_CALL});
}
}
}