summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
diff options
context:
space:
mode:
authorFilip Pizlo <fpizlo@apple.com>2013-05-14 19:29:00 +0000
committerFilip Pizlo <fpizlo@apple.com>2013-05-14 19:29:00 +0000
commit9bc53e84677d0cff2001ac70c08c78a5e907527e (patch)
treeac4e31e0125602b83d6436bed51d19ca412dd05b /llvm/unittests/ExecutionEngine
parentb2132553d9542a3204148c5a3f1f718ecb9b35fa (diff)
downloadbcm5719-llvm-9bc53e84677d0cff2001ac70c08c78a5e907527e.tar.gz
bcm5719-llvm-9bc53e84677d0cff2001ac70c08c78a5e907527e.zip
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. llvm-svn: 181820
Diffstat (limited to 'llvm/unittests/ExecutionEngine')
-rw-r--r--llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
index b0e98a88def..e99aa991604 100644
--- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
+++ b/llvm/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;
};
OpenPOWER on IntegriCloud