Turn off dump/emit routines when building minimal subzero.
Remove the dump/emit routines when ALLOW_DUMP=0. Also fixes some
verbosity messages to not print if ALLOW_DUMP=0. Note: emit routines
needed for emitIAS are not turned off.
BUG=None
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/686913005
diff --git a/src/IceTranslator.cpp b/src/IceTranslator.cpp
index 08e5697..954da47 100644
--- a/src/IceTranslator.cpp
+++ b/src/IceTranslator.cpp
@@ -106,8 +106,8 @@
llvm::OwningPtr<TargetGlobalInitLowering> GlobalLowering(
TargetGlobalInitLowering::createLowering(Ctx->getTargetArch(), Ctx));
bool DisableTranslation = Ctx->getFlags().DisableTranslation;
- bool DumpGlobalVariables =
- Ctx->isVerbose() && Ctx->getFlags().VerboseFocusOn.empty();
+ const bool DumpGlobalVariables =
+ ALLOW_DUMP && Ctx->isVerbose() && Ctx->getFlags().VerboseFocusOn.empty();
Ostream &Stream = Ctx->getStrDump();
const IceString &TranslateOnly = Ctx->getFlags().TranslateOnly;
for (const Ice::VariableDeclaration *Global : VariableDeclarations) {