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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228358 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/Unwind/Unwind_AppleExtras.cpp b/src/Unwind/Unwind_AppleExtras.cpp
index 6d02a66..b8baef5 100644
--- a/src/Unwind/Unwind_AppleExtras.cpp
+++ b/src/Unwind/Unwind_AppleExtras.cpp
@@ -41,7 +41,7 @@
// 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 @@
__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 @@
}
-#if !FOR_DYLD && _LIBUNWIND_BUILD_SJLJ_APIS
+#if !defined(FOR_DYLD) && _LIBUNWIND_BUILD_SJLJ_APIS
#include <System/pthread_machdep.h>
diff --git a/src/Unwind/config.h b/src/Unwind/config.h
index 6a2a8ce..6a70897 100644
--- a/src/Unwind/config.h
+++ b/src/Unwind/config.h
@@ -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