Strengthen AstNode types to AstNodeExpr

Declare every AstNode children and variables as AstNodeExpr where we
statically know this is the appropriate sub-type.
This commit is contained in:
Geza Lore
2022-11-20 19:31:28 +00:00
parent 352d0b4582
commit 3abb65d732
52 changed files with 1742 additions and 1572 deletions
+3 -3
View File
@@ -174,8 +174,8 @@ class ForceConvertVisitor final : public VNVisitor {
pushDeletep(nodep);
FileLine* const flp = nodep->fileline();
AstNode* const lhsp = nodep->lhsp(); // The LValue we are forcing
AstNode* const rhsp = nodep->rhsp(); // The value we are forcing it to
AstNodeExpr* const lhsp = nodep->lhsp(); // The LValue we are forcing
AstNodeExpr* const rhsp = nodep->rhsp(); // The value we are forcing it to
// Set corresponding enable signals to ones
V3Number ones{lhsp, lhsp->width()};
@@ -210,7 +210,7 @@ class ForceConvertVisitor final : public VNVisitor {
pushDeletep(nodep);
FileLine* const flp = nodep->fileline();
AstNode* const lhsp = nodep->lhsp(); // The LValue we are releasing
AstNodeExpr* const lhsp = nodep->lhsp(); // The LValue we are releasing
// Set corresponding enable signals to zero
V3Number zero{lhsp, lhsp->width()};