forked from OSchip/llvm-project
[NFC] Try fix ubsan buildbot after 876d133789
This commit is contained in:
parent
388bccb013
commit
c5ec8890c9
|
@ -73,7 +73,9 @@ public:
|
|||
#define GET_ATTR_NAMES
|
||||
#define ATTRIBUTE_ENUM(ENUM_NAME, OTHER) ENUM_NAME,
|
||||
#include "llvm/IR/Attributes.inc"
|
||||
EndAttrKinds ///< Sentinal value useful for loops
|
||||
EndAttrKinds, ///< Sentinal value useful for loops
|
||||
EmptyKey, ///< Use as Empty key for DenseMap of AttrKind
|
||||
TombstoneKey, ///< Use as Tombstone key for DenseMap of AttrKind
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
|
@ -60,13 +60,11 @@ inline bool hasAttributeInAssume(CallInst &AssumeCI, Value *IsOn,
|
|||
}
|
||||
|
||||
template<> struct DenseMapInfo<Attribute::AttrKind> {
|
||||
static constexpr auto MaxValue = std::numeric_limits<
|
||||
std::underlying_type<Attribute::AttrKind>::type>::max();
|
||||
static Attribute::AttrKind getEmptyKey() {
|
||||
return static_cast<Attribute::AttrKind>(MaxValue);
|
||||
return Attribute::EmptyKey;
|
||||
}
|
||||
static Attribute::AttrKind getTombstoneKey() {
|
||||
return static_cast<Attribute::AttrKind>(MaxValue - 1);
|
||||
return Attribute::TombstoneKey;
|
||||
}
|
||||
static unsigned getHashValue(Attribute::AttrKind AK) {
|
||||
return hash_combine(AK);
|
||||
|
|
|
@ -1218,6 +1218,8 @@ StructType *BitcodeReader::createIdentifiedStructType(LLVMContext &Context) {
|
|||
static uint64_t getRawAttributeMask(Attribute::AttrKind Val) {
|
||||
switch (Val) {
|
||||
case Attribute::EndAttrKinds:
|
||||
case Attribute::EmptyKey:
|
||||
case Attribute::TombstoneKey:
|
||||
llvm_unreachable("Synthetic enumerators which should never get here");
|
||||
|
||||
case Attribute::None: return 0;
|
||||
|
|
|
@ -887,6 +887,8 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
|
|||
case Attribute::ZExt:
|
||||
case Attribute::ImmArg:
|
||||
case Attribute::EndAttrKinds:
|
||||
case Attribute::EmptyKey:
|
||||
case Attribute::TombstoneKey:
|
||||
continue;
|
||||
// Those attributes should be safe to propagate to the extracted function.
|
||||
case Attribute::AlwaysInline:
|
||||
|
|
Loading…
Reference in New Issue