summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/MCJIT
diff options
context:
space:
mode:
authorDavid Tweed <david.tweed@arm.com>2013-05-17 10:01:46 +0000
committerDavid Tweed <david.tweed@arm.com>2013-05-17 10:01:46 +0000
commit2e7efedd39bcafb2b6c22557b9eccd5243f1cc1c (patch)
tree38315153dd4a02300d8f4e1069ca6ede714680ba /llvm/lib/ExecutionEngine/MCJIT
parentb7be72df5bb3d06be9d5315f74d5c83909f6c5ae (diff)
downloadbcm5719-llvm-2e7efedd39bcafb2b6c22557b9eccd5243f1cc1c.tar.gz
bcm5719-llvm-2e7efedd39bcafb2b6c22557b9eccd5243f1cc1c.zip
Minor changes to the MCJITTest unittests to use the correct API for finalizing
the JIT object (including XFAIL an ARM test that now needs fixing). Also renames internal function for consistency. llvm-svn: 182085
Diffstat (limited to 'llvm/lib/ExecutionEngine/MCJIT')
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp2
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.h7
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp2
3 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index ced567205aa..e8619385635 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -178,7 +178,7 @@ void MCJIT::finalizeObject() {
MemMgr->registerEHFrames(EHData);
// Set page permissions.
- MemMgr->applyPermissions();
+ MemMgr->finalizeMemory();
}
void *MCJIT::getPointerToBasicBlock(BasicBlock *BB) {
diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
index 7f247e2dee5..a899d4f4080 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
+++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h
@@ -52,6 +52,13 @@ public:
/// Sets the object manager that MCJIT should use to avoid compilation.
virtual void setObjectCache(ObjectCache *manager);
+ /// finalizeObject - ensure the module is fully processed and is usable.
+ ///
+ /// It is the user-level function for completing the process of making the
+ /// object usable for execution. It should be called after sections within an
+ /// object have been relocated using mapSectionAddress. When this method is
+ /// called the MCJIT execution engine will reapply relocations for a loaded
+ /// object.
virtual void finalizeObject();
virtual void *getPointerToBasicBlock(BasicBlock *BB);
diff --git a/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp b/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp
index bac77ce75f4..1bb0103f08e 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp
+++ b/llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp
@@ -111,7 +111,7 @@ uint8_t *SectionMemoryManager::allocateSection(MemoryGroup &MemGroup,
return (uint8_t*)Addr;
}
-bool SectionMemoryManager::applyPermissions(std::string *ErrMsg)
+bool SectionMemoryManager::finalizeMemory(std::string *ErrMsg)
{
// FIXME: Should in-progress permissions be reverted if an error occurs?
error_code ec;
OpenPOWER on IntegriCloud