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 {
93
93
UWTable, // /< Function must be in a unwind table
94
94
ZExt, // /< Zero extended before/after call
95
95
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
97
101
};
98
102
private:
99
103
AttributeImpl *pImpl;
@@ -165,10 +169,10 @@ class Attribute {
165
169
// / AttrBuilder.
166
170
template <> struct DenseMapInfo <Attribute::AttrKind> {
167
171
static inline Attribute::AttrKind getEmptyKey () {
168
- return Attribute::AttrKind (~ 0U ) ;
172
+ return Attribute::EmptyKey ;
169
173
}
170
174
static inline Attribute::AttrKind getTombstoneKey () {
171
- return Attribute::AttrKind (~ 0U - 1 ) ;
175
+ return Attribute::TombstoneKey ;
172
176
}
173
177
static unsigned getHashValue (const Attribute::AttrKind &Val) {
174
178
return Val * 37U ;
Original file line number Diff line number Diff line change @@ -426,6 +426,8 @@ uint64_t AttributeImpl::getBitMask() const {
426
426
uint64_t AttributeImpl::getAttrMask (Attribute::AttrKind Val) {
427
427
switch (Val) {
428
428
case Attribute::EndAttrKinds: break ;
429
+ case Attribute::EmptyKey: break ;
430
+ case Attribute::TombstoneKey: break ;
429
431
case Attribute::None: return 0 ;
430
432
case Attribute::ZExt: return 1 << 0 ;
431
433
case Attribute::SExt: return 1 << 1 ;
You can’t perform that action at this time.
0 commit comments