mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 10:48:27 +02:00
Internals: Fix marking AstVars as class members (#7070)
This commit is contained in:
@@ -73,6 +73,11 @@ class LinkResolveVisitor final : public VNVisitor {
|
||||
void visit(AstClass* nodep) override {
|
||||
VL_RESTORER(m_classp);
|
||||
m_classp = nodep;
|
||||
for (AstNode* stmtp = nodep->stmtsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||
if (AstVar* const varp = VN_CAST(stmtp, Var)) {
|
||||
if (!varp->isParam()) varp->varType(VVarType::MEMBER);
|
||||
}
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstConstraint* nodep) override {
|
||||
@@ -120,7 +125,6 @@ class LinkResolveVisitor final : public VNVisitor {
|
||||
}
|
||||
void visit(AstVar* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
if (m_classp && !nodep->isParam()) nodep->varType(VVarType::MEMBER);
|
||||
if (m_ftaskp) nodep->funcLocal(true);
|
||||
if (nodep->isSigModPublic()) {
|
||||
nodep->sigModPublic(false); // We're done with this attribute
|
||||
|
||||
Reference in New Issue
Block a user