[clang] [clang][PAC][NFC] Provide addition support macros to ptrauth.h (PR #161027)
Anatoly Trosinenko via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 7 04:53:10 PDT 2025
================
@@ -263,6 +294,32 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
#define ptrauth_sign_generic_data(__value, __data) \
__builtin_ptrauth_sign_generic_data(__value, __data)
+/* Define some standard __ptrauth qualifiers used in the ABI. */
+#define __ptrauth_function_pointer(__typekey) \
+ __ptrauth(ptrauth_key_function_pointer, 0, __typekey)
----------------
atrosinenko wrote:
`__type_discriminator` was probably intended here, as the key is hardcoded
```suggestion
#define __ptrauth_function_pointer(__type_discriminator) \
__ptrauth(ptrauth_key_function_pointer, 0, __type_discriminator)
```
https://github.com/llvm/llvm-project/pull/161027
More information about the cfe-commits
mailing list