[libcxxabi] r228358 - Silence some -Wundef warnings

Saleem Abdulrasool compnerd at compnerd.org
Thu Feb 5 15:27:39 PST 2015


Author: compnerd
Date: Thu Feb  5 17:27:39 2015
New Revision: 228358

URL: http://llvm.org/viewvc/llvm-project?rev=228358&view=rev
Log:
Silence some -Wundef warnings

config.h:53:7: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:44:5: warning '__arm__' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:60:7: warning '__arm64__' is not defined, evaluates to 0 [-Wundef]
Unwind_AppleExtras.cpp:186:6: warning 'FOR_DYLD' is not defined, evaluates to 0 [-Wundef]

Use defined(macro) which should be equivalent in these cases, silencing -Wundef
warnings.  NFC.

Modified:
    libcxxabi/trunk/src/Unwind/Unwind_AppleExtras.cpp
    libcxxabi/trunk/src/Unwind/config.h

Modified: libcxxabi/trunk/src/Unwind/Unwind_AppleExtras.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/Unwind_AppleExtras.cpp?rev=228358&r1=228357&r2=228358&view=diff
==============================================================================
--- libcxxabi/trunk/src/Unwind/Unwind_AppleExtras.cpp (original)
+++ libcxxabi/trunk/src/Unwind/Unwind_AppleExtras.cpp Thu Feb  5 17:27:39 2015
@@ -41,7 +41,7 @@ struct libgcc_object_info {
 
 
 // static linker symbols to prevent wrong two level namespace for _Unwind symbols
-#if __arm__
+#if defined(__arm__)
    #define NOT_HERE_BEFORE_5_0(sym)     \
        extern const char sym##_tmp30 __asm("$ld$hide$os3.0$_" #sym ); \
        __attribute__((visibility("default"))) const char sym##_tmp30 = 0; \
@@ -57,7 +57,7 @@ struct libgcc_object_info {
           __attribute__((visibility("default"))) const char sym##_tmp42 = 0; \
        extern const char sym##_tmp43 __asm("$ld$hide$os4.3$_" #sym ); \
           __attribute__((visibility("default"))) const char sym##_tmp43 = 0;
-#elif __arm64__
+#elif defined(__arm64__)
   #define NOT_HERE_BEFORE_10_6(sym)
   #define NEVER_HERE(sym)
 #else
@@ -183,7 +183,7 @@ bool checkKeyMgrRegisteredFDEs(uintptr_t
 }
 
 
-#if !FOR_DYLD && _LIBUNWIND_BUILD_SJLJ_APIS
+#if !defined(FOR_DYLD) && _LIBUNWIND_BUILD_SJLJ_APIS
 
 #include <System/pthread_machdep.h>
 

Modified: libcxxabi/trunk/src/Unwind/config.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/config.h?rev=228358&r1=228357&r2=228358&view=diff
==============================================================================
--- libcxxabi/trunk/src/Unwind/config.h (original)
+++ libcxxabi/trunk/src/Unwind/config.h Thu Feb  5 17:27:39 2015
@@ -50,7 +50,7 @@
   #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
   #define _LIBUNWIND_ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg)
 
-  #if FOR_DYLD
+  #if defined(FOR_DYLD)
     #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
     #define _LIBUNWIND_SUPPORT_DWARF_UNWIND   0
     #define _LIBUNWIND_SUPPORT_DWARF_INDEX    0





More information about the cfe-commits mailing list