Internals: Change AstAssignVarScope into AstAliasScope (#6280) (#6512)

Rename and make it derive from AstNode instead of AstNodeAssign.

Small step towards #6280. No functional change.
This commit is contained in:
Geza Lore
2025-09-30 06:40:17 +01:00
committed by GitHub
parent 283810cbf7
commit e04f51ebd2
9 changed files with 25 additions and 34 deletions
+2 -4
View File
@@ -90,7 +90,7 @@ class InstVisitor final : public VNVisitor {
->subDTypep()
->skipRefp(),
IfaceRefDType))) {
// Create an AstAssignVarScope for Vars to Cells so we can
// Create an AstAliasScope for Vars to Cells so we can
// link with their scope later
AstNodeExpr* const lhsp = new AstVarXRef{exprp->fileline(), nodep->modVarp(),
m_cellp->name(), VAccess::READ};
@@ -98,9 +98,7 @@ class InstVisitor final : public VNVisitor {
const AstVarXRef* const xrefp = VN_CAST(exprp, VarXRef);
UASSERT_OBJ(refp || xrefp, exprp,
"Interfaces: Pin is not connected to a VarRef or VarXRef");
AstAssignVarScope* const assp
= new AstAssignVarScope{exprp->fileline(), lhsp, exprp};
m_cellp->addNextHere(assp);
m_cellp->addNextHere(new AstAliasScope{exprp->fileline(), lhsp, exprp});
} else {
nodep->v3error("Assigned pin is neither input nor output");
}