Index: src/IceCompiler.cpp |
diff --git a/src/IceCompiler.cpp b/src/IceCompiler.cpp |
index 7a0dcbb5fec73461662ca787e1ba22b915123a37..ff70b8cefb0d4cae88288ae0105badaa602585e0 100644 |
--- a/src/IceCompiler.cpp |
+++ b/src/IceCompiler.cpp |
@@ -93,6 +93,9 @@ void Compiler::run(const Ice::ClFlagsExtra &ExtraFlags, GlobalContext &Ctx, |
Ctx.getErrorStatus()->assign(EC_Args); |
return; |
} |
+ // Globals must be kept alive after lowering when converting from LLVM to |
+ // Ice. |
+ Ctx.setDisposeGlobalVariablesAfterLowering(false); |
// Parse the input LLVM IR file into a module. |
llvm::SMDiagnostic Err; |
TimerMarker T1(Ice::TimerStack::TT_parse, &Ctx); |