@@ -324,6 +324,9 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
324
324
#define __ptrauth_swift_type_layout_string \
325
325
__ptrauth (ptrauth_key_process_independent_data, 1 , \
326
326
SpecialPointerAuthDiscriminators::TypeLayoutString)
327
+ #define __ptrauth_swift_deinit_work_function \
328
+ __ptrauth (ptrauth_key_function_pointer, 1 , \
329
+ SpecialPointerAuthDiscriminators::DeinitWorkFunction)
327
330
328
331
#if __has_attribute(ptrauth_struct)
329
332
#define swift_ptrauth_struct (key, discriminator ) \
@@ -364,6 +367,7 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
364
367
#define swift_ptrauth_sign_opaque_read_resume_function (__fn, __buffer ) (__fn)
365
368
#define swift_ptrauth_sign_opaque_modify_resume_function (__fn, __buffer ) (__fn)
366
369
#define __ptrauth_swift_type_layout_string
370
+ #define __ptrauth_swift_deinit_work_function
367
371
#define swift_ptrauth_struct (key, discriminator )
368
372
#define swift_ptrauth_struct_derived (from )
369
373
#endif
@@ -542,6 +546,17 @@ swift_auth_code(T value, unsigned extra) {
542
546
#endif
543
547
}
544
548
549
+ template <typename T>
550
+ SWIFT_RUNTIME_ATTRIBUTE_ALWAYS_INLINE static inline T
551
+ swift_auth_code_function (T value, unsigned extra) {
552
+ #if SWIFT_PTRAUTH
553
+ return (T)ptrauth_auth_function ((void *)value,
554
+ ptrauth_key_function_pointer, extra);
555
+ #else
556
+ return value;
557
+ #endif
558
+ }
559
+
545
560
// / Does this platform support backtrace-on-crash?
546
561
#ifdef __APPLE__
547
562
# include < TargetConditionals.h>
0 commit comments