Skip to content

Commit 22ba618

Browse files
committed
[clang] Remove stdint.h from ptrauth.h.
This was originally fixed downstream as rdar://59828556, then in stable/20230725 as #7967. We ended up picking up the fixed version of most of ptrauth.h (and the matching test) following the upstream commit that added the file. But the merge didn't remove the include; it only brought some of the `__UINTPTR_TYPE__` usage. rdar://129378800
1 parent 5b83dfb commit 22ba618

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/lib/Headers/ptrauth.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#ifndef __PTRAUTH_H
1111
#define __PTRAUTH_H
1212

13-
#include <stdint.h>
14-
1513
typedef enum {
1614
ptrauth_key_asia = 0,
1715
ptrauth_key_asib = 1,
@@ -126,7 +124,7 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
126124
127125
The first argument must be an expression of pointer type.
128126
The second argument must be an expression of integer type.
129-
The result will have type uintptr_t. */
127+
The result will have type ptrauth_extra_data_t. */
130128
#define ptrauth_blend_discriminator(__pointer, __integer) \
131129
__builtin_ptrauth_blend_discriminator(__pointer, __integer)
132130

@@ -260,7 +258,7 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
260258
if the arguments were a pointer and a discriminator.
261259
262260
The arguments must be either pointers or integers; if integers, they
263-
will be coerce to uintptr_t. */
261+
will be coerce to ptrauth_extra_data_t. */
264262
#define ptrauth_sign_generic_data(__value, __data) \
265263
__builtin_ptrauth_sign_generic_data(__value, __data)
266264

@@ -349,8 +347,8 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
349347

350348
#define ptrauth_sign_constant(__value, __key, __data) __value
351349
#define ptrauth_auth_function(__value, __old_key, __old_data) __value
352-
#define ptrauth_string_discriminator(__string) ((uintptr_t)0)
353-
#define ptrauth_type_discriminator(__type) ((uintptr_t)0)
350+
#define ptrauth_string_discriminator(__string) ((ptrauth_extra_data_t)0)
351+
#define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)
354352

355353
#define __ptrauth_function_pointer
356354
#define __ptrauth_return_address

0 commit comments

Comments
 (0)