summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/MCJIT
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-04-29 17:49:40 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-04-29 17:49:40 +0000
commitd2755af8bda2e0fd80efb46556485c4cdbe8704a (patch)
tree2bf7b4c7494a8692b0a982b9b7c774a196cb100e /lib/ExecutionEngine/MCJIT
parent87b5017139e9d8ac9b046b3284a9cc68c76185d6 (diff)
downloadllvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.tar.gz
llvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.tar.bz2
llvm-d2755af8bda2e0fd80efb46556485c4cdbe8704a.tar.xz
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')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 9e42cd0441..f4e5e61aa8 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,