From e37fb9ddc57bbe0fdb9831d2c3ca5aa0d18df56a Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Fri, 17 Oct 2003 18:31:59 +0000 Subject: Don't release the Module, as that invalidates the Module* within the ModuleProvider, which has bad consequences in lli::callAsMain() which tries to access that same Module*. llvm-svn: 9205 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp') diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index ceeb857020f..d25abfb63f7 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -28,7 +28,7 @@ ExecutionEngine::ExecutionEngine(ModuleProvider *P) : } ExecutionEngine::ExecutionEngine(Module *M) : CurMod(*M), MP(0) { - assert(M && "Module is null?"); + assert(M && "Module is null?"); } ExecutionEngine::~ExecutionEngine() { @@ -51,7 +51,7 @@ ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, // If we can't make a JIT, make an interpreter instead. try { if (EE == 0) - EE = Interpreter::create(MP->releaseModule(), TraceMode); + EE = Interpreter::create(MP->materializeModule(), TraceMode); } catch (...) { EE = 0; } -- cgit v1.2.3