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

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: use WriteAmt everywhere 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
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 08aed06c8577e128b911e1843abd7674c0fe9d1e..2a3f11e10101fda4523a598924d4ae6f3abe53ef 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;
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698