
The qualifier allows programmer to directly control how pointers are signed when they are stored in a particular variable. The qualifier takes three arguments: the signing key, a flag specifying whether address discrimination should be used, and a non-negative integer that is used for additional discrimination. ``` typedef void (*my_callback)(const void*); my_callback __ptrauth(ptrauth_key_process_dependent_code, 1, 0xe27a) callback; ``` Co-Authored-By: John McCall rjmccall@apple.com
13 lines
386 B
Plaintext
13 lines
386 B
Plaintext
; RUN: llvm-undname < %s | FileCheck %s
|
|
|
|
; CHECK-NOT: Invalid mangled name
|
|
|
|
?s@@3U?$S@PE__ptrauth1A@ENC@AH@@A
|
|
; CHECK: struct S<int *__ptrauth(2, 0, 1234)> s
|
|
|
|
?foo@@YAXPEAPE__ptrauth20OK@AH@Z
|
|
; CHECK: void __cdecl foo(int *__ptrauth(3, 1, 234)*)
|
|
|
|
??$foo@PEAPE__ptrauth0A@EA@AH@@YAXPEAPE__ptrauth0A@EA@AH@Z
|
|
; CHECK: void __cdecl foo<int *__ptrauth(1, 0, 64)*>(int *__ptrauth(1, 0, 64)*)
|