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

Unified Diff: src/IceGlobalInits.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/IceGlobalInits.h ('k') | src/IceInst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalInits.cpp
diff --git a/src/IceGlobalInits.cpp b/src/IceGlobalInits.cpp
index 2ee5e625aa8a77694d8d3a1b034950bd4edef423..f9c576396eef3e37807b50f8d5f2fb35ac31d1e6 100644
--- a/src/IceGlobalInits.cpp
+++ b/src/IceGlobalInits.cpp
@@ -27,7 +27,7 @@ char hexdigit(unsigned X) { return X < 10 ? '0' + X : 'A' + X - 10; }
void dumpLinkage(Ice::Ostream &Stream,
llvm::GlobalValue::LinkageTypes Linkage) {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
switch (Linkage) {
case llvm::GlobalValue::ExternalLinkage:
@@ -46,7 +46,7 @@ void dumpLinkage(Ice::Ostream &Stream,
}
void dumpCallingConv(Ice::Ostream &, llvm::CallingConv::ID CallingConv) {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
if (CallingConv == llvm::CallingConv::C)
return;
@@ -61,13 +61,13 @@ void dumpCallingConv(Ice::Ostream &, llvm::CallingConv::ID CallingConv) {
namespace Ice {
void FunctionDeclaration::dumpType(Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
Stream << Signature;
}
void FunctionDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
if (IsProto)
Stream << "declare ";
@@ -87,7 +87,7 @@ void FunctionDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
}
void VariableDeclaration::dumpType(Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
if (Initializers->size() == 1) {
Initializers->front()->dumpType(Stream);
@@ -107,7 +107,7 @@ void VariableDeclaration::dumpType(Ostream &Stream) const {
}
void VariableDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
Stream << "@"
<< ((Ctx && !getSuppressMangling()) ? Ctx->mangleName(Name) : Name)
@@ -140,14 +140,14 @@ void VariableDeclaration::dump(GlobalContext *Ctx, Ostream &Stream) const {
}
void VariableDeclaration::Initializer::dumpType(Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
Stream << "[" << getNumBytes() << " x " << Ice::IceType_i8 << "]";
}
void VariableDeclaration::DataInitializer::dump(GlobalContext *,
Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
dumpType(Stream);
Stream << " c\"";
@@ -165,21 +165,21 @@ void VariableDeclaration::DataInitializer::dump(GlobalContext *,
void VariableDeclaration::ZeroInitializer::dump(GlobalContext *,
Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
dumpType(Stream);
Stream << " zeroinitializer";
}
void VariableDeclaration::RelocInitializer::dumpType(Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
Stream << Ice::IceType_i32;
}
void VariableDeclaration::RelocInitializer::dump(GlobalContext *Ctx,
Ostream &Stream) const {
- if (!ALLOW_DUMP)
+ if (!Ice::BuildDefs::dump())
return;
if (Offset != 0) {
dumpType(Stream);
« no previous file with comments | « src/IceGlobalInits.h ('k') | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698