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

Unified Diff: src/IceOperand.h

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use constexpr inline functions instead of macros Created 5 years, 6 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
« src/IceDefs.h ('K') | « src/IceInstX8632.cpp ('k') | src/IceOperand.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 35342fad192e61d2b45f6d36d3df9c593e5411cd..387d70e3a57ea82eec2caa21a043abee803362fb 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -69,13 +69,13 @@ public:
// situation where Func==nullptr.
virtual void dump(const Cfg *Func, Ostream &Str) const = 0;
void dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
assert(Func);
dump(Func, Func->getContext()->getStrDump());
}
void dump(Ostream &Str) const {
- if (ALLOW_DUMP)
+ if (buildAllowsDump())
dump(nullptr, Str);
}
@@ -163,7 +163,7 @@ public:
void emit(TargetLowering *Target) const final;
using Constant::dump;
void dump(const Cfg *, Ostream &Str) const override {
- if (ALLOW_DUMP)
+ if (buildAllowsDump())
Str << getValue();
}
@@ -189,7 +189,7 @@ typedef ConstantPrimitive<double, Operand::kConstDouble> ConstantDouble;
template <>
inline void ConstantInteger32::dump(const Cfg *, Ostream &Str) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
if (getType() == IceType_i1)
Str << (getValue() ? "true" : "false");
@@ -203,7 +203,7 @@ bool ConstantInteger32::shouldBeRandomizedOrPooled(const GlobalContext *Ctx);
template <>
inline void ConstantInteger64::dump(const Cfg *, Ostream &Str) const {
- if (!ALLOW_DUMP)
+ if (!buildAllowsDump())
return;
assert(getType() == IceType_i64);
Str << static_cast<int64_t>(getValue());
@@ -292,7 +292,7 @@ public:
void emit(TargetLowering *Target) const final;
using Constant::dump;
void dump(const Cfg *, Ostream &Str) const override {
- if (ALLOW_DUMP)
+ if (buildAllowsDump())
Str << "undef";
}
« src/IceDefs.h ('K') | « src/IceInstX8632.cpp ('k') | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698