diff options
author | Filip Pizlo <fpizlo@apple.com> | 2013-05-14 19:29:00 +0000 |
---|---|---|
committer | Filip Pizlo <fpizlo@apple.com> | 2013-05-14 19:29:00 +0000 |
commit | 13a3cf192887233fb9452ec5b7f841e4652c33c7 (patch) | |
tree | 68b95b8ef313e2cc3e179c9966a920afa855932b /unittests/ExecutionEngine | |
parent | a29a8965e206e689d292d7f2e42f2548770e30d3 (diff) | |
download | external_llvm-13a3cf192887233fb9452ec5b7f841e4652c33c7.zip external_llvm-13a3cf192887233fb9452ec5b7f841e4652c33c7.tar.gz external_llvm-13a3cf192887233fb9452ec5b7f841e4652c33c7.tar.bz2 |
SectionMemoryManager shouldn't be a JITMemoryManager. Previously, the
EngineBuilder interface required a JITMemoryManager even if it was being used
to construct an MCJIT. But the MCJIT actually wants a RTDyldMemoryManager.
Consequently, the SectionMemoryManager, which is meant for MCJIT, derived
from the JITMemoryManager and then stubbed out a bunch of JITMemoryManager
methods that weren't relevant to the MCJIT.
This patch fixes the situation: it teaches the EngineBuilder that
RTDyldMemoryManager is a supertype of JITMemoryManager, and that it's
appropriate to pass a RTDyldMemoryManager instead of a JITMemoryManager if
we're using the MCJIT. This allows us to remove the stub methods from
SectionMemoryManager, and make SectionMemoryManager a direct subtype of
RTDyldMemoryManager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine')
-rw-r--r-- | unittests/ExecutionEngine/MCJIT/MCJITTestBase.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h index b0e98a8..e99aa99 100644 --- a/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h +++ b/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h @@ -165,7 +165,7 @@ protected: std::string Error; TheJIT.reset(EB.setEngineKind(EngineKind::JIT) .setUseMCJIT(true) /* can this be folded into the EngineKind enum? */ - .setJITMemoryManager(MM) + .setMCJITMemoryManager(MM) .setErrorStr(&Error) .setOptLevel(CodeGenOpt::None) .setAllocateGVsWithCode(false) /*does this do anything?*/ @@ -188,7 +188,7 @@ protected: OwningPtr<TargetMachine> TM; OwningPtr<ExecutionEngine> TheJIT; IRBuilder<> Builder; - JITMemoryManager *MM; + RTDyldMemoryManager *MM; OwningPtr<Module> M; }; |