diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-28 09:44:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-28 09:44:37 +0000 |
commit | c8c6c03dda789a6af20b23182b11bef088498735 (patch) | |
tree | 8a5d9666df719773bf0b2c4da85d44003a5954fa /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 4b75e04a6033e248f2e3b7665f6d6bac6b197c5d (diff) | |
download | bcm5719-llvm-c8c6c03dda789a6af20b23182b11bef088498735.tar.gz bcm5719-llvm-c8c6c03dda789a6af20b23182b11bef088498735.zip |
Pass around IntrinsicLowering instances as appropriate.
Reimplement the Interpreters implementation of va_* to be more direct.
llvm-svn: 10627
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index bb52c943111..45643abca9d 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -17,6 +17,7 @@ #include "JIT/JIT.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" +#include "llvm/IntrinsicLowering.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" @@ -105,20 +106,23 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn, /// NULL is returned. /// ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP, - bool ForceInterpreter) { + bool ForceInterpreter, + IntrinsicLowering *IL) { ExecutionEngine *EE = 0; - // Unless the interpreter was explicitly selected, make a JIT. + // Unless the interpreter was explicitly selected, try making a JIT. if (!ForceInterpreter) - EE = JIT::create(MP); + EE = JIT::create(MP, IL); // If we can't make a JIT, make an interpreter instead. try { if (EE == 0) - EE = Interpreter::create(MP->materializeModule()); + EE = Interpreter::create(MP->materializeModule(), IL); } catch (...) { EE = 0; } + + if (EE == 0) delete IL; return EE; } |