Index: src/IceTargetLoweringX8664Traits.h |
diff --git a/src/IceTargetLoweringX8664Traits.h b/src/IceTargetLoweringX8664Traits.h |
index 50a1544920ea3fbebabf9b762364e8e05f45c8d3..336e3dfcacb1f31ecf9fed626c19d32de99e4d20 100644 |
--- a/src/IceTargetLoweringX8664Traits.h |
+++ b/src/IceTargetLoweringX8664Traits.h |
@@ -784,9 +784,7 @@ public: |
/// representation of the vector. |
static Type getInVectorElementType(Type Ty) { |
assert(isVectorType(Ty)); |
- size_t Index = static_cast<size_t>(Ty); |
- (void)Index; |
- assert(Index < TableTypeX8664AttributesSize); |
+ assert(Ty < TableTypeX8664AttributesSize); |
return TableTypeX8664Attributes[Ty].InVectorElementType; |
} |
@@ -841,9 +839,8 @@ public: |
/// @} |
static Cond::BrCond getIcmp32Mapping(InstIcmp::ICond Cond) { |
- size_t Index = static_cast<size_t>(Cond); |
- assert(Index < TableIcmp32Size); |
- return TableIcmp32[Index].Mapping; |
+ assert(Cond < TableIcmp32Size); |
+ return TableIcmp32[Cond].Mapping; |
} |
static const struct TableTypeX8664AttributesType { |
@@ -1004,7 +1001,7 @@ public: |
static SpillVariable *create(Cfg *Func, Type Ty, SizeT Index) { |
return new (Func->allocate<SpillVariable>()) SpillVariable(Ty, Index); |
} |
- const static OperandKind SpillVariableKind = |
+ constexpr static auto SpillVariableKind = |
static_cast<OperandKind>(kVariable_Target); |
static bool classof(const Operand *Operand) { |
return Operand->getKind() == SpillVariableKind; |