Skip to content

[clang] Remove stdint.h from ptrauth.h. #8881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions clang/lib/Headers/ptrauth.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef __PTRAUTH_H
#define __PTRAUTH_H

#include <stdint.h>

typedef enum {
ptrauth_key_asia = 0,
ptrauth_key_asib = 1,
Expand Down Expand Up @@ -126,7 +124,7 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;

The first argument must be an expression of pointer type.
The second argument must be an expression of integer type.
The result will have type uintptr_t. */
The result will have type ptrauth_extra_data_t. */
#define ptrauth_blend_discriminator(__pointer, __integer) \
__builtin_ptrauth_blend_discriminator(__pointer, __integer)

Expand Down Expand Up @@ -260,7 +258,7 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;
if the arguments were a pointer and a discriminator.

The arguments must be either pointers or integers; if integers, they
will be coerce to uintptr_t. */
will be coerce to ptrauth_extra_data_t. */
#define ptrauth_sign_generic_data(__value, __data) \
__builtin_ptrauth_sign_generic_data(__value, __data)

Expand Down Expand Up @@ -349,8 +347,8 @@ typedef __UINTPTR_TYPE__ ptrauth_generic_signature_t;

#define ptrauth_sign_constant(__value, __key, __data) __value
#define ptrauth_auth_function(__value, __old_key, __old_data) __value
#define ptrauth_string_discriminator(__string) ((uintptr_t)0)
#define ptrauth_type_discriminator(__type) ((uintptr_t)0)
#define ptrauth_string_discriminator(__string) ((ptrauth_extra_data_t)0)
#define ptrauth_type_discriminator(__type) ((ptrauth_extra_data_t)0)

#define __ptrauth_function_pointer
#define __ptrauth_return_address
Expand Down