Add --emit-accessors (#5182) (#5227)

This commit is contained in:
Ryan Ziegler
2024-07-06 13:12:53 +01:00
committed by GitHub
parent de44ca8df3
commit 947b6fd23f
11 changed files with 111 additions and 0 deletions
+4
View File
@@ -65,6 +65,10 @@ class NameVisitor final : public VNVisitorConst {
nodep->name(newname);
nodep->editCountInc();
} else if (VN_IS(nodep, CFunc) && VN_AS(nodep, CFunc)->isConstructor()) {
} else if (v3Global.opt.emitAccessors() && VN_IS(nodep, Var) && VN_AS(nodep, Var)->isSigPublic()) {
const string newname = "__Vm_sig_" + nodep->name();
nodep->name(newname);
nodep->editCountInc();
} else {
renameKeywordCheck(nodep);
}