| Index: src/IceOperand.h
|
| diff --git a/src/IceOperand.h b/src/IceOperand.h
|
| index 1cc0441cabe3f08ebe0040a28f420f0fcdc1af61..48a7ceb9b139b4ea7077360f5106c564f6a010d1 100644
|
| --- a/src/IceOperand.h
|
| +++ b/src/IceOperand.h
|
| @@ -139,14 +139,16 @@ class ConstantPrimitive : public Constant {
|
| ConstantPrimitive &operator=(const ConstantPrimitive &) = delete;
|
|
|
| public:
|
| - static ConstantPrimitive *create(GlobalContext *Ctx, Type Ty, T Value,
|
| + typedef T PrimType;
|
| +
|
| + static ConstantPrimitive *create(GlobalContext *Ctx, Type Ty, PrimType Value,
|
| uint32_t PoolEntryID) {
|
| assert(!Ctx->isIRGenerationDisabled() &&
|
| "Attempt to build primitive constant when IR generation disabled");
|
| return new (Ctx->allocate<ConstantPrimitive>())
|
| ConstantPrimitive(Ty, Value, PoolEntryID);
|
| }
|
| - T getValue() const { return Value; }
|
| + PrimType getValue() const { return Value; }
|
| using Constant::emit;
|
| // The target needs to implement this for each ConstantPrimitive
|
| // specialization.
|
| @@ -162,10 +164,10 @@ public:
|
| }
|
|
|
| private:
|
| - ConstantPrimitive(Type Ty, T Value, uint32_t PoolEntryID)
|
| + ConstantPrimitive(Type Ty, PrimType Value, uint32_t PoolEntryID)
|
| : Constant(K, Ty, PoolEntryID), Value(Value) {}
|
| ~ConstantPrimitive() override {}
|
| - const T Value;
|
| + const PrimType Value;
|
| };
|
|
|
| typedef ConstantPrimitive<int32_t, Operand::kConstInteger32> ConstantInteger32;
|
|
|