diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-04-29 17:49:40 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-04-29 17:49:40 +0000 |
commit | d2755af8bda2e0fd80efb46556485c4cdbe8704a (patch) | |
tree | 2bf7b4c7494a8692b0a982b9b7c774a196cb100e /lib/ExecutionEngine/MCJIT/MCJIT.cpp | |
parent | 87b5017139e9d8ac9b046b3284a9cc68c76185d6 (diff) | |
download | external_llvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.zip external_llvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.tar.gz external_llvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.tar.bz2 |
Exposing MCJIT through C API
Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).
Patch by Fili Pizlo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT/MCJIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/MCJIT/MCJIT.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 9e42cd0..f4e5e61 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -14,6 +14,7 @@ #include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/ExecutionEngine/ObjectBuffer.h" #include "llvm/ExecutionEngine/ObjectImage.h" +#include "llvm/ExecutionEngine/SectionMemoryManager.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Function.h" @@ -46,7 +47,7 @@ ExecutionEngine *MCJIT::createJIT(Module *M, // FIXME: Don't do this here. sys::DynamicLibrary::LoadLibraryPermanently(0, NULL); - return new MCJIT(M, TM, JMM, GVsWithCode); + return new MCJIT(M, TM, JMM ? JMM : new SectionMemoryManager(), GVsWithCode); } MCJIT::MCJIT(Module *m, TargetMachine *tm, RTDyldMemoryManager *MM, |