From b22ef71d46f0f583dc1401f20df809d1da8d1831 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Fri, 3 Oct 2008 16:17:20 +0000 Subject: 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 --- llvm/lib/System/Memory.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'llvm/lib/System/Memory.cpp') 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 -} -- cgit v1.2.3