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

Unified Diff: src/PNaClTranslator.cpp

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/IceTypes.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index cb05493836d29c60ec0cc242b0d957ec79aaa27e..dfc3fb746c5297d50a7e069f73696d86d5d13a6a 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -80,14 +80,14 @@ private:
};
Ice::Ostream &operator<<(Ice::Ostream &Stream, const ExtendedType &Ty) {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return Stream;
Ty.dump(Stream);
return Stream;
}
Ice::Ostream &operator<<(Ice::Ostream &Stream, ExtendedType::TypeKind Kind) {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return Stream;
Stream << "ExtendedType::";
switch (Kind) {
@@ -136,7 +136,7 @@ public:
};
void ExtendedType::dump(Ice::Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
Stream << Kind;
switch (Kind) {
@@ -1564,7 +1564,7 @@ private:
void dumpVectorIndexCheckValue(raw_ostream &Stream,
VectorIndexCheckValue Value) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
switch (Value) {
case VectorIndexNotVector:
@@ -2838,7 +2838,7 @@ void FunctionValuesymtabParser::setValueName(NaClBcIndexSize_t Index,
return;
Ice::Operand *Op = getFunctionParser()->getOperand(Index);
if (Ice::Variable *V = dyn_cast<Ice::Variable>(Op)) {
- if (ALLOW_DUMP) {
+ if (Ice::BuildDefs::dump()) {
std::string Nm(Name.data(), Name.size());
V->setName(getFunctionParser()->getFunc(), Nm);
}
@@ -2856,7 +2856,7 @@ void FunctionValuesymtabParser::setBbName(NaClBcIndexSize_t Index,
return;
}
std::string Nm(Name.data(), Name.size());
- if (ALLOW_DUMP)
+ if (Ice::BuildDefs::dump())
getFunctionParser()->getFunc()->getNodes()[Index]->setName(Nm);
}
« no previous file with comments | « src/IceTypes.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698