Internals: Cleanup code duplication. No functional change intended.

This commit is contained in:
Wilson Snyder
2026-08-21 16:51:19 -04:00
parent 9badc5485d
commit 8844593abb
3 changed files with 7 additions and 11 deletions
+1 -3
View File
@@ -698,9 +698,7 @@ void connectPort(AstNodeModule* modp, AstVar* nodep, AstNodeExpr* pinExprp) {
const auto pinRefAsExpr = [&](VAccess access) -> AstNodeExpr* {
if (const AstVarRef* const vrp = VN_CAST(pinRefp, VarRef)) {
AstVarRef* const newp = new AstVarRef{vrp->fileline(), vrp->varp(), access};
newp->classOrPackagep(vrp->classOrPackagep());
return newp;
return pinRefAsVarRef(access);
} else {
const AstVarXRef* const xrp = VN_AS(pinRefp, VarXRef);
AstVarXRef* const newp