[llvm-branch-commits] [clang] [llvm] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

Daniil Kovalev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 10 06:04:07 PDT 2024


================
@@ -112,6 +135,17 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
 #define ptrauth_auth_data(__value, __old_key, __old_data)                      \
   __builtin_ptrauth_auth(__value, __old_key, __old_data)
 
+/* Compute a constant discriminator from the given string.
+
+   The result can be used as the second argument to
+   ptrauth_blend_discriminator or the third argument to the
+   __ptrauth qualifier.  It has type size_t.
----------------
kovdan01 wrote:

> It has type size_t.

Is it actually size_t? I suppose this should be `ptrauth_extra_data_t` (and in clang/docs/PointerAuthentication.rst, we have `ptrauth_extra_data_t`).

One more thought (also applies to #93904, #93906 and any other PRs touching both the rst docs and ptrauth.h header) - can we just use the exact same text for the rst docs and for the comments in the header?

https://github.com/llvm/llvm-project/pull/93903


More information about the llvm-branch-commits mailing list