diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2023-04-14 17:49:03 +0100 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2023-04-15 10:37:28 +0100 |
commit | ca4fb463187ce244d61dc62a8f4e3e01d1872cc2 (patch) | |
tree | ad331a9461bf0936c7ceca88c7a95acb602acc8e /libunwind | |
parent | 2e43eea2da4ec9d2e8f9ce2fd8fae0c034d2465a (diff) | |
download | llvm-ca4fb463187ce244d61dc62a8f4e3e01d1872cc2.zip llvm-ca4fb463187ce244d61dc62a8f4e3e01d1872cc2.tar.gz llvm-ca4fb463187ce244d61dc62a8f4e3e01d1872cc2.tar.bz2 |
[libunwind] Sync Unwind_AppleExtras.cpp with downstream version
Both had diverged in a few ways, so this brings them both back in sync.
Differential Revision: https://reviews.llvm.org/D148351
Diffstat (limited to 'libunwind')
-rw-r--r-- | libunwind/src/Unwind_AppleExtras.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/libunwind/src/Unwind_AppleExtras.cpp b/libunwind/src/Unwind_AppleExtras.cpp index ffb49a8..b1c08ba 100644 --- a/libunwind/src/Unwind_AppleExtras.cpp +++ b/libunwind/src/Unwind_AppleExtras.cpp @@ -9,10 +9,13 @@ #include "config.h" +#include <TargetConditionals.h> + // static linker symbols to prevent wrong two level namespace for _Unwind symbols #if defined(__arm__) - #define NOT_HERE_BEFORE_5_0(sym) \ +# if defined(__USING_SJLJ_EXCEPTIONS__) && TARGET_OS_IOS +# 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; \ extern const char sym##_tmp31 __asm("$ld$hide$os3.1$_" #sym ); \ @@ -27,22 +30,27 @@ __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 defined(__aarch64__) - #define NOT_HERE_BEFORE_10_6(sym) - #define NEVER_HERE(sym) -#else - #define NOT_HERE_BEFORE_10_6(sym) \ +# else // defined(__USING_SJLJ_EXCEPTIONS__) && TARGET_OS_IOS +# define NOT_HERE_BEFORE_5_0(sym) +# define NOT_HERE_BEFORE_10_6(sym) +# define NEVER_HERE(sym) +# endif // defined(__USING_SJLJ_EXCEPTIONS__) && TARGET_OS_IOS +#elif TARGET_OS_OSX && !defined(__aarch64__) +# define NOT_HERE_BEFORE_10_6(sym) \ extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \ __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \ __attribute__((visibility("default"))) const char sym##_tmp5 = 0; - #define NEVER_HERE(sym) \ +# define NEVER_HERE(sym) \ extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \ __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \ extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \ __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \ extern const char sym##_tmp6 __asm("$ld$hide$os10.6$_" #sym ); \ __attribute__((visibility("default"))) const char sym##_tmp6 = 0; +#else +# define NOT_HERE_BEFORE_10_6(sym) +# define NEVER_HERE(sym) #endif |