summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-11 21:12:51 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-11 21:12:51 +0000
commitbf570b98f221226e667863fa73281dd2aadc75c6 (patch)
tree3c37f3092893b55bc6d32cdf706c5b7ba1166311 /llvm/tools/lli/lli.cpp
parentd284c1d80dfd86319d58578395c4022f18425099 (diff)
downloadbcm5719-llvm-bf570b98f221226e667863fa73281dd2aadc75c6.tar.gz
bcm5719-llvm-bf570b98f221226e667863fa73281dd2aadc75c6.zip
lli should create a JIT memory manager.
Previously let the JITEmitter do it. That's rather odd, and doesn't play nice with the MCJIT, so move the (trivial) logic up. llvm-svn: 147967
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index f855eda195a..b79925e9266 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -23,6 +23,7 @@
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
+#include "llvm/ExecutionEngine/JITMemoryManager.h"
#include "llvm/ExecutionEngine/MCJIT.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/IRReader.h"
@@ -192,6 +193,8 @@ int main(int argc, char **argv, char * const *envp) {
}
}
+ JITMemoryManager *JMM = JITMemoryManager::CreateDefaultMemManager();
+
EngineBuilder builder(Mod);
builder.setMArch(MArch);
builder.setMCPU(MCPU);
@@ -199,6 +202,7 @@ int main(int argc, char **argv, char * const *envp) {
builder.setRelocationModel(RelocModel);
builder.setCodeModel(CMModel);
builder.setErrorStr(&ErrorMsg);
+ builder.setJITMemoryManager(JMM);
builder.setEngineKind(ForceInterpreter
? EngineKind::Interpreter
: EngineKind::JIT);
OpenPOWER on IntegriCloud