Internals: Misc enum cleanups. No functional change.

This commit is contained in:
Wilson Snyder 2019-07-06 15:50:25 -04:00
parent a5f2ce0dad
commit bea34d0ced
3 changed files with 3 additions and 5 deletions

View File

@ -1887,7 +1887,7 @@ public:
//
// Changing the width may confuse the data type resolution, so must clear
// TypeTable cache after use.
void widthForce(int width, int sized) { m_width = width; m_widthMin = sized; }
void widthForce(int width, int widthMin) { m_width = width; m_widthMin = widthMin; }
// For backward compatibility inherit width and signing from the subDType/base type
void widthFromSub(AstNodeDType* nodep) { m_width = nodep->m_width; m_widthMin = nodep->m_widthMin; m_numeric = nodep->m_numeric; }
//

View File

@ -87,9 +87,7 @@ public:
AstConst(FileLine* fl, uint32_t num)
: AstNodeMath(fl)
, m_num(V3Number(this, 32, num)) {
dtypeSetLogicSized(m_num.width(),
m_num.sized() ? 0 : m_num.widthMin(),
AstNumeric::UNSIGNED);
dtypeSetLogicSized(m_num.width(), 0, AstNumeric::UNSIGNED);
}
class Unsized32 {}; // for creator type-overload selection
AstConst(FileLine* fl, Unsized32, uint32_t num) // Unsized 32-bit integer of specified value

View File

@ -1630,7 +1630,7 @@ private:
UASSERT_OBJ(nodep->itemp(), nodep, "Not linked");
bool did = false;
if (nodep->itemp()->valuep()) {
//if (debug()) nodep->varp()->valuep()->dumpTree(cout, " visitvaref: ");
//if (debug()) nodep->itemp()->valuep()->dumpTree(cout, " visitvaref: ");
iterateAndNextNull(nodep->itemp()->valuep());
if (AstConst* valuep = VN_CAST(nodep->itemp()->valuep(), Const)) {
const V3Number& num = valuep->num();