aboutsummaryrefslogtreecommitdiff
path: root/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
commitcce6c297c54b4c9c8615c77e97cd64e70812ea60 (patch)
tree2a65c3ce20bd2065ace4af4a03507d11dcbc03a0 /lib/System/Memory.cpp
parent48b828fdb467655fa630fed41e49e2a481fb6dab (diff)
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.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Memory.cpp')
-rw-r--r--lib/System/Memory.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/System/Memory.cpp b/lib/System/Memory.cpp
index 2fc6a23a3a..3660bcb1a4 100644
--- a/lib/System/Memory.cpp
+++ b/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
-}