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.

llvm-svn: 228358
This commit is contained in:
Saleem Abdulrasool 2015-02-05 23:27:39 +00:00
parent ee0639d37e
commit ae1ca06a31
2 changed files with 4 additions and 4 deletions

View File

@ -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 pc, void *&fde) {
}
#if !FOR_DYLD && _LIBUNWIND_BUILD_SJLJ_APIS
#if !defined(FOR_DYLD) && _LIBUNWIND_BUILD_SJLJ_APIS
#include <System/pthread_machdep.h>

View File

@ -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