[llvm-branch-commits] [llvm-branch] r69095 - /llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp

Bill Wendling isanbard at gmail.com
Tue Apr 14 15:46:28 PDT 2009


Author: void
Date: Tue Apr 14 17:46:28 2009
New Revision: 69095

URL: http://llvm.org/viewvc/llvm-project?rev=69095&view=rev
Log:
--- Merging (from foreign repository) r69090 into '.':
U    lib/ExecutionEngine/JIT/JIT.cpp

Mac OS X 10.6 and above do not use key manager to register EH frames.

Modified:
    llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp

Modified: llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp?rev=69095&r1=69094&r2=69095&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/branches/Apple/Dib/lib/ExecutionEngine/JIT/JIT.cpp Tue Apr 14 17:46:28 2009
@@ -86,7 +86,13 @@
 
 extern "C" void __register_frame(void*);
 
-#if defined(__APPLE__)
+#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
+# define USE_KEYMGR 1
+#else
+# define USE_KEYMGR 0
+#endif
+
+#if USE_KEYMGR
 
 namespace {
 
@@ -224,7 +230,7 @@
   
   // Register routine for informing unwinding runtime about new EH frames
 #if defined(__GNUC__) && !defined(__ARM_EABI__)
-#if defined(__APPLE__)
+#if USE_KEYMGR
   struct LibgccObjectInfo* LOI = (struct LibgccObjectInfo*)
     _keymgr_get_and_lock_processwide_ptr(KEYMGR_GCC3_DW2_OBJ_LIST);
   





More information about the llvm-branch-commits mailing list