[llvm-commits] [llvm] r69090 - /llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Evan Cheng evan.cheng at apple.com
Tue Apr 14 15:32:00 PDT 2009


Author: evancheng
Date: Tue Apr 14 17:31:59 2009
New Revision: 69090

URL: http://llvm.org/viewvc/llvm-project?rev=69090&view=rev
Log:
Mac OS X 10.6 and above do not use key manager to register EH frames.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=69090&r1=69089&r2=69090&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Tue Apr 14 17:31:59 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-commits mailing list