summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Memory.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2008-10-03 16:17:20 +0000
committerJim Grosbach <grosbach@apple.com>2008-10-03 16:17:20 +0000
commitb22ef71d46f0f583dc1401f20df809d1da8d1831 (patch)
treecdb15da7dd03d15b3bc71aeaad0572c8c16e68a0 /llvm/lib/System/Memory.cpp
parent332ad5e01630e1d8c1b976dd7bf1a5a893df8e94 (diff)
downloadbcm5719-llvm-b22ef71d46f0f583dc1401f20df809d1da8d1831.tar.gz
bcm5719-llvm-b22ef71d46f0f583dc1401f20df809d1da8d1831.zip
On Darwin ARM, memory needs special handling to do JIT. This patch expands
this handling to work properly for modifying stub functions, relocations back to entry points after JIT compilation, etc.. llvm-svn: 57013
Diffstat (limited to 'llvm/lib/System/Memory.cpp')
-rw-r--r--llvm/lib/System/Memory.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/System/Memory.cpp b/llvm/lib/System/Memory.cpp
index 2fc6a23a3af..3660bcb1a4a 100644
--- a/llvm/lib/System/Memory.cpp
+++ b/llvm/lib/System/Memory.cpp
@@ -58,14 +58,3 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr,
#endif // end PPC
}
-
-bool llvm::sys::Memory::SetRXPrivilege(const void *Addr, size_t Size) {
-#if defined(__APPLE__) && defined(__arm__)
- kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)Addr,
- (vm_size_t)Size, 0,
- VM_PROT_READ | VM_PROT_EXECUTE | VM_PROT_COPY);
- return KERN_SUCCESS == kr;
-#else
- return true;
-#endif
-}
OpenPOWER on IntegriCloud