mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 18:42:58 +02:00
Fix --protect-ids when using SV classes (#2994)
A few names were incorrectly mangled, which made --protect-ids produce invalid output when certain SV class constructs were uses. Now fixed and added a few extra tests to catch this.
This commit is contained in:
+2
-1
@@ -1157,7 +1157,8 @@ private:
|
||||
cfuncp->argTypes(EmitCBaseVisitor::symClassVar());
|
||||
if (cfuncp->name() == "new") {
|
||||
cfuncp->addInitsp(
|
||||
new AstCStmt(nodep->fileline(), "_ctor_var_reset(vlSymsp);\n"));
|
||||
new AstCStmt(nodep->fileline(),
|
||||
VIdProtect::protect("_ctor_var_reset") + "(vlSymsp);\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user