Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/IceOperand.h

Issue 837393005: Subzero: Write float/double constant pools directly to the ELF file. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: misc cleanup Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698