Chromium Code Reviews| Index: src/IceTargetLoweringX8664Traits.h |
| diff --git a/src/IceTargetLoweringX8664Traits.h b/src/IceTargetLoweringX8664Traits.h |
| index 50a1544920ea3fbebabf9b762364e8e05f45c8d3..25ab3f367fb805be1179a35b6f7e07d9c078a259 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 = |
| + const static auto SpillVariableKind = |
|
John
2016/02/07 16:18:33
While at this, constexpr?
Jim Stichnoth
2016/02/07 16:42:42
Done.
|
| static_cast<OperandKind>(kVariable_Target); |
| static bool classof(const Operand *Operand) { |
| return Operand->getKind() == SpillVariableKind; |