diff --git a/src/V3DfgDataType.h b/src/V3DfgDataType.h index 729b4c0b9..5af232b84 100644 --- a/src/V3DfgDataType.h +++ b/src/V3DfgDataType.h @@ -125,6 +125,8 @@ public: // Thanks to the interning, equality is identity bool operator==(const DfgDataType& that) const { return this == &that; } bool operator!=(const DfgDataType& that) const { return this != &that; } + // Similarly for hash + V3Hash hash() const { return V3Hash{this}; } // Type of elements, for arrays only const DfgDataType& elemDtype() const { @@ -132,13 +134,6 @@ public: return *m_elemDtypep; } - V3Hash hash() const { - V3Hash hash{static_cast(m_kind)}; - hash += m_size; - if (m_elemDtypep) hash += m_elemDtypep->hash(); - return hash; - } - //----------------------------------------------------------------------- // Static factory and management functions