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

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: Cleanup 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
« no previous file with comments | « 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..786f51b5772bde7c3ae77b6c3b3674a9826fd8af 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 (!BuildDefs::dump())
return;
assert(Func);
dump(Func, Func->getContext()->getStrDump());
}
void dump(Ostream &Str) const {
- if (ALLOW_DUMP)
+ if (BuildDefs::dump())
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 (BuildDefs::dump())
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 (!BuildDefs::dump())
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 (!BuildDefs::dump())
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 (BuildDefs::dump())
Str << "undef";
}
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698