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

Unified Diff: src/IceCompiler.cpp

Issue 1179313004: Fix a bug that would cause subzero to fail when --threads=0. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses codereview comments. 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/IceCfgNode.cpp ('k') | src/IceELFObjectWriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCompiler.cpp
diff --git a/src/IceCompiler.cpp b/src/IceCompiler.cpp
index 2db7abcda95ef96d39521b435d9320e92fb5d0f2..7619b179b42cbe6351d54c7adbbc7a0eb9e9ef15 100644
--- a/src/IceCompiler.cpp
+++ b/src/IceCompiler.cpp
@@ -141,21 +141,28 @@ void Compiler::run(const Ice::ClFlagsExtra &ExtraFlags, GlobalContext &Ctx,
}
Ctx.waitForWorkerThreads();
- Translator->transferErrorCode();
- Translator->emitConstants();
-
- if (Ctx.getFlags().getOutFileType() == FT_Elf) {
- TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx);
- Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms());
- Ctx.getObjectWriter()->writeNonUserSections();
+ if (Translator->getErrorStatus()) {
+ Ctx.getErrorStatus()->assign(Translator->getErrorStatus().value());
+ } else {
+ Ctx.lowerGlobals("last");
+ Ctx.lowerProfileData();
+ Ctx.lowerConstants();
+
+ if (Ctx.getFlags().getOutFileType() == FT_Elf) {
+ TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx);
+ Ctx.getObjectWriter()->setUndefinedSyms(Ctx.getConstantExternSyms());
+ Ctx.getObjectWriter()->writeNonUserSections();
+ }
}
+
if (Ctx.getFlags().getSubzeroTimingEnabled())
Ctx.dumpTimers();
+
if (Ctx.getFlags().getTimeEachFunction()) {
const bool DumpCumulative = false;
Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative);
}
- const bool FinalStats = true;
+ constexpr bool FinalStats = true;
Ctx.dumpStats("_FINAL_", FinalStats);
}
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceELFObjectWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698