2121#include " cxa_handlers.h"
2222#include " private_typeinfo.h"
2323
24- #if __has_feature(ptrauth_calls)
24+ #if __ptrauth_cxxabi_enabled
2525
2626// CXXABI depends on defintions in libunwind as pointer auth couples the
2727// definitions
@@ -602,7 +602,7 @@ set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context,
602602 reinterpret_cast <uintptr_t >(unwind_exception));
603603 _Unwind_SetGR (context, __builtin_eh_return_data_regno (1 ),
604604 static_cast <uintptr_t >(results.ttypeIndex ));
605- #if __has_feature(ptrauth_calls)
605+ #if __ptrauth_cxxabi_enabled
606606 auto stackPointer = _Unwind_GetGR (context, UNW_REG_SP);
607607 // We manually re-sign the IP as the __ptrauth qualifiers cannot
608608 // express the required relationship with the destination address
@@ -973,7 +973,7 @@ _UA_CLEANUP_PHASE
973973using __cxa_catch_temp_type = decltype (__cxa_exception::catchTemp);
974974static inline void set_landing_pad (scan_results& results,
975975 const __cxa_catch_temp_type& source) {
976- #if __has_feature(ptrauth_calls)
976+ #if __ptrauth_cxxabi_enabled
977977 const uintptr_t sourceDiscriminator =
978978 ptrauth_blend_discriminator (&source, __ptrauth_cxxabi_catch_temp_disc);
979979 const uintptr_t targetDiscriminator =
@@ -995,7 +995,7 @@ static inline void set_landing_pad(scan_results& results,
995995
996996static inline void get_landing_pad (__cxa_catch_temp_type &dest,
997997 const scan_results &results) {
998- #if __has_feature(ptrauth_calls)
998+ #if __ptrauth_cxxabi_enabled
999999 const uintptr_t sourceDiscriminator =
10001000 ptrauth_blend_discriminator (&results.landingPad ,
10011001 __ptrauth_scan_results_landingpad_disc);
0 commit comments