[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JIT.cpp

Evan Cheng evan.cheng at apple.com
Fri Sep 1 11:43:14 PDT 2006



Changes in directory llvm/lib/ExecutionEngine/JIT:

JIT.cpp updated: 1.76 -> 1.77
---
Log message:

Last check-in was a mistake...

I've been told apple gcc version number is not guaranteed to increase
monotonically. Change the preprocess condition to make it less risky.

The configuration change is done during the middle 10.4 life cycle so we have
to check __APPLE_CC. For future OS X release, we should be able to assume
-fenable-cxa-atexit is the default.


---
Diffs of the changes:  (+6 -4)

 JIT.cpp |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)


Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.76 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.77
--- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.76	Fri Sep  1 13:40:46 2006
+++ llvm/lib/ExecutionEngine/JIT/JIT.cpp	Fri Sep  1 13:42:59 2006
@@ -32,8 +32,9 @@
 
 #ifdef __APPLE__ 
 #include <AvailabilityMacros.h>
-#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \
-    __APPLE_CC__ >= 5330
+#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
+    (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&    \
+     __APPLE_CC__ >= 5330)
 // __dso_handle is resolved by Mac OS X dynamic linker.
 extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
 #endif
@@ -310,8 +311,9 @@
   // If the global is external, just remember the address.
   if (GV->isExternal()) {
 #ifdef __APPLE__
-#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || \
-    __APPLE_CC__ >= 5330
+#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
+    (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 &&    \
+     __APPLE_CC__ >= 5330)
     // Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead
     // of atexit). It passes the address of linker generated symbol __dso_handle
     // to the function.






More information about the llvm-commits mailing list