Rearrange emit vs emitIAS. Wait till function is done before dumping text.
Eventually, I wanted to have a flag "UseELFWriter" like:
https://codereview.chromium.org/678533005/diff/120001/src/IceCfg.cpp
Where the emit OStream would not have text, and only have
binary. This refactor hopefully means fewer places to
check for a flag to disable the text version of IAS,
and be able to write binary. Otherwise, there are some
text labels for branches that are still being dumped out.
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/700263003
diff --git a/src/IceTranslator.cpp b/src/IceTranslator.cpp
index 0391b6c..edaa74f 100644
--- a/src/IceTranslator.cpp
+++ b/src/IceTranslator.cpp
@@ -83,7 +83,11 @@
ErrorStatus = true;
}
- Func->emit();
+ if (Ctx->getFlags().UseIntegratedAssembler) {
+ Func->emitIAS();
+ } else {
+ Func->emit();
+ }
Ctx->dumpStats(Func->getFunctionName());
}