Internals: enum constructor cleanups. No functional change intended.

This commit is contained in:
Wilson Snyder
2022-09-15 19:58:10 -04:00
parent dbe1348b4c
commit 2dc85a5acd
26 changed files with 123 additions and 121 deletions
+4 -4
View File
@@ -625,8 +625,8 @@ private:
iterate(nodep->lhsp());
if (optimizable()) {
if (fetchConst(nodep->lhsp())->num().isEqZero()) {
const AstConst cnst(nodep->fileline(), AstConst::WidthedValue(), 1,
1); // a one
const AstConst cnst{nodep->fileline(), AstConst::WidthedValue{}, 1,
1}; // a one
newValue(nodep, &cnst); // a one
} else {
iterate(nodep->rhsp());
@@ -1022,8 +1022,8 @@ private:
m_callStack.push_back(&stackNode);
// Clear output variable
if (const auto* const basicp = VN_CAST(funcp->fvarp(), Var)->basicp()) {
AstConst cnst(funcp->fvarp()->fileline(), AstConst::WidthedValue(), basicp->widthMin(),
0);
AstConst cnst{funcp->fvarp()->fileline(), AstConst::WidthedValue{}, basicp->widthMin(),
0};
if (basicp->isZeroInit()) {
cnst.num().setAllBits0();
} else {