diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-01-11 21:12:51 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-01-11 21:12:51 +0000 |
commit | bf9ab932c1efea8804b3bc9d5b66314e6374d4cd (patch) | |
tree | 0d73b5ef53b284928bbdafb65a99792fe4d3e655 /tools | |
parent | fae699a580380b910740e1cb17ab950ba91ce4a1 (diff) | |
download | external_llvm-bf9ab932c1efea8804b3bc9d5b66314e6374d4cd.zip external_llvm-bf9ab932c1efea8804b3bc9d5b66314e6374d4cd.tar.gz external_llvm-bf9ab932c1efea8804b3bc9d5b66314e6374d4cd.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lli/lli.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index f855eda..b79925e 100644 --- a/tools/lli/lli.cpp +++ b/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); |