[clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

Ahmed Bougacha via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 18 13:56:05 PDT 2024


================
@@ -328,6 +328,21 @@ be done in a single instruction with an immediate integer.
 ``pointer`` must have pointer type, and ``integer`` must have integer type. The
 result has type ``ptrauth_extra_data_t``.
 
+``ptrauth_string_discriminator``
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: c
+
+  ptrauth_string_discriminator(string)
+
+Produce a discriminator value for the given string.  ``string`` must be
+a string literal of ``char`` character type.  The result has type
+``ptrauth_extra_data_t``.
+
+The result is always a constant expression.  The result value is never zero and
+always within range for both the ``__ptrauth`` qualifier and
----------------
ahmedbougacha wrote:

That's with `ptrauth_blend_discriminator`

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


More information about the cfe-commits mailing list