File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,11 @@ class Attribute {
9393 UWTable, // /< Function must be in a unwind table
9494 ZExt, // /< Zero extended before/after call
9595
96- EndAttrKinds // /< Sentinal value useful for loops
96+ EndAttrKinds, // /< Sentinal value useful for loops
97+
98+ // Values for DenseMapInfo
99+ EmptyKey = 0x7FFFFFFF ,
100+ TombstoneKey = -0x7FFFFFFF - 1
97101 };
98102private:
99103 AttributeImpl *pImpl;
@@ -165,10 +169,10 @@ class Attribute {
165169// / AttrBuilder.
166170template <> struct DenseMapInfo <Attribute::AttrKind> {
167171 static inline Attribute::AttrKind getEmptyKey () {
168- return Attribute::AttrKind (~ 0U ) ;
172+ return Attribute::EmptyKey ;
169173 }
170174 static inline Attribute::AttrKind getTombstoneKey () {
171- return Attribute::AttrKind (~ 0U - 1 ) ;
175+ return Attribute::TombstoneKey ;
172176 }
173177 static unsigned getHashValue (const Attribute::AttrKind &Val) {
174178 return Val * 37U ;
Original file line number Diff line number Diff line change @@ -426,6 +426,8 @@ uint64_t AttributeImpl::getBitMask() const {
426426uint64_t AttributeImpl::getAttrMask (Attribute::AttrKind Val) {
427427 switch (Val) {
428428 case Attribute::EndAttrKinds: break ;
429+ case Attribute::EmptyKey: break ;
430+ case Attribute::TombstoneKey: break ;
429431 case Attribute::None: return 0 ;
430432 case Attribute::ZExt: return 1 << 0 ;
431433 case Attribute::SExt: return 1 << 1 ;
You can’t perform that action at this time.
0 commit comments