blob: 3267b0786c28f8c102b972cb56b249735fe21bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// RUN: %clang_cc1 -E %s -triple=aarch64 -fptrauth-intrinsics | \
// RUN: FileCheck %s --check-prefixes=INTRIN
// RUN: %clang_cc1 -E %s -triple=aarch64 -fptrauth-calls | \
// RUN: FileCheck %s --check-prefixes=NOINTRIN
// RUN: %clang_cc1 -E %s -DIS_DARWIN -triple=arm64e-apple-darwin -fptrauth-intrinsics | \
// RUN: FileCheck %s --check-prefixes=INTRIN,INTRIN_MAC
// RUN: %clang_cc1 -E %s -DIS_DARWIN -triple=arm64e-apple-darwin -fptrauth-calls | \
// RUN: FileCheck %s --check-prefixes=NOINTRIN
#if defined(IS_DARWIN) && __has_extension(ptrauth_qualifier)
// INTRIN_MAC: has_ptrauth_qualifier1
void has_ptrauth_qualifier1() {}
#ifndef __PTRAUTH__
#error ptrauth_qualifier extension present without predefined test macro
#endif
#endif
#if defined(IS_DARWIN) && __has_feature(ptrauth_qualifier)
// INTRIN_MAC: has_ptrauth_qualifier2
void has_ptrauth_qualifier2() {}
#ifndef __PTRAUTH__
#error ptrauth_qualifier extension present without predefined test macro
#endif
#endif
#if defined(__PTRAUTH__)
// INTRIN: has_ptrauth_qualifier3
void has_ptrauth_qualifier3() {}
#endif
#if !defined(__PTRAUTH__) && !__has_feature(ptrauth_qualifier) && !__has_extension(ptrauth_qualifier)
// NOINTRIN: no_ptrauth_qualifier
void no_ptrauth_qualifier() {}
#endif
|