aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-03 18:19:18 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-03 18:19:18 +0000
commitd4c0e62413ac4c81467ce59025c81210ea431752 (patch)
tree4206b3ff623a0e5dc9a4bf3b47540281beb70b0f /lib/ExecutionEngine/ExecutionEngine.cpp
parentc923435a5953993c046b6259a8c4c0589e00b69f (diff)
downloadexternal_llvm-d4c0e62413ac4c81467ce59025c81210ea431752.zip
external_llvm-d4c0e62413ac4c81467ce59025c81210ea431752.tar.gz
external_llvm-d4c0e62413ac4c81467ce59025c81210ea431752.tar.bz2
Deal with error handling better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index ca077fc..92e0020 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -45,6 +45,7 @@ ExecutionEngine::ExecutionEngine(Module *M) {
}
ExecutionEngine::~ExecutionEngine() {
+ clearAllGlobalMappings();
for (unsigned i = 0, e = Modules.size(); i != e; ++i)
delete Modules[i];
}
@@ -252,16 +253,17 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
/// NULL is returned.
///
ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP,
- bool ForceInterpreter) {
+ bool ForceInterpreter,
+ std::string *ErrorStr) {
ExecutionEngine *EE = 0;
// Unless the interpreter was explicitly selected, try making a JIT.
if (!ForceInterpreter && JITCtor)
- EE = JITCtor(MP);
+ EE = JITCtor(MP, ErrorStr);
// If we can't make a JIT, make an interpreter instead.
if (EE == 0 && InterpCtor)
- EE = InterpCtor(MP);
+ EE = InterpCtor(MP, ErrorStr);
if (EE) {
// Make sure we can resolve symbols in the program as well. The zero arg