diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/Attributes.h | 9 | ||||
| -rw-r--r-- | llvm/lib/IR/Attributes.cpp | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h index 1932ffd..1e5b1bb 100644 --- a/llvm/include/llvm/IR/Attributes.h +++ b/llvm/include/llvm/IR/Attributes.h @@ -95,9 +95,8 @@ public: EndAttrKinds, ///< Sentinal value useful for loops - // Values for DenseMapInfo - EmptyKey = 0x7FFFFFFF, - TombstoneKey = -0x7FFFFFFF - 1 + AttrKindEmptyKey, ///< Empty key value for DenseMapInfo + AttrKindTombstoneKey ///< Tombstone key value for DenseMapInfo }; private: AttributeImpl *pImpl; @@ -169,10 +168,10 @@ public: /// AttrBuilder. template<> struct DenseMapInfo<Attribute::AttrKind> { static inline Attribute::AttrKind getEmptyKey() { - return Attribute::EmptyKey; + return Attribute::AttrKindEmptyKey; } static inline Attribute::AttrKind getTombstoneKey() { - return Attribute::TombstoneKey; + return Attribute::AttrKindTombstoneKey; } static unsigned getHashValue(const Attribute::AttrKind &Val) { return Val * 37U; diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 039e036..c0704dc 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -425,9 +425,11 @@ uint64_t AttributeImpl::getBitMask() const { uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) { switch (Val) { - case Attribute::EndAttrKinds: break; - case Attribute::EmptyKey: break; - case Attribute::TombstoneKey: break; + case Attribute::EndAttrKinds: + case Attribute::AttrKindEmptyKey: + case Attribute::AttrKindTombstoneKey: + llvm_unreachable("Synthetic enumerators which should never get here"); + case Attribute::None: return 0; case Attribute::ZExt: return 1 << 0; case Attribute::SExt: return 1 << 1; |
