1
- // RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,TYPE
2
- // RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,ZERO
3
- // RUN: %clang_cc1 -xc++ %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,CHECKCXX,TYPE,TYPECXX
1
+ // RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics \
2
+ // RUN: -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,TYPE
3
+
4
+ // RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
5
+ // RUN: -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,TYPE
6
+
7
+ // RUN: %clang_cc1 %s -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics \
8
+ // RUN: -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,ZERO
9
+
10
+ // RUN: %clang_cc1 %s -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
11
+ // RUN: -disable-llvm-passes -emit-llvm -o- | FileCheck %s --check-prefixes=CHECK,ZERO
12
+
13
+ // RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64e-apple-ios13 -fptrauth-calls -fptrauth-intrinsics \
14
+ // RUN: -disable-llvm-passes -emit-llvm -xc++ -o- | FileCheck %s --check-prefixes=CHECK,CHECKCXX,TYPE,TYPECXX
15
+
16
+ // RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics \
17
+ // RUN: -disable-llvm-passes -emit-llvm -xc++ -o- | FileCheck %s --check-prefixes=CHECK,CHECKCXX,TYPE,TYPECXX
4
18
5
19
#ifdef __cplusplus
6
20
extern "C" {
@@ -19,12 +33,12 @@ struct ptr_member {
19
33
ptr_member pm ;
20
34
void (* test_member )() = (void (* )())pm .fptr_ ;
21
35
22
- // CHECKCXX-LABEL: define internal void @__cxx_global_var_init
36
+ // CHECKCXX-LABEL: define{{.*}} internal void @__cxx_global_var_init
23
37
// TYPECXX: call i64 @llvm.ptrauth.resign(i64 {{.*}}, i32 0, i64 2712, i32 0, i64 18983)
24
38
#endif
25
39
26
40
27
- // CHECK-LABEL: define void @test_cast_to_opaque
41
+ // CHECK-LABEL: define{{.*}} void @test_cast_to_opaque
28
42
void test_cast_to_opaque () {
29
43
opaque = (void * )f ;
30
44
@@ -33,7 +47,7 @@ void test_cast_to_opaque() {
33
47
// ZERO-NOT: @llvm.ptrauth.resign
34
48
}
35
49
36
- // CHECK-LABEL: define void @test_cast_from_opaque
50
+ // CHECK-LABEL: define{{.*}} void @test_cast_from_opaque
37
51
void test_cast_from_opaque () {
38
52
fptr = (void (* )(void ))opaque ;
39
53
@@ -48,7 +62,7 @@ void test_cast_from_opaque() {
48
62
// ZERO-NOT: @llvm.ptrauth.resign
49
63
}
50
64
51
- // CHECK-LABEL: define void @test_cast_to_intptr
65
+ // CHECK-LABEL: define{{.*}} void @test_cast_to_intptr
52
66
void test_cast_to_intptr () {
53
67
uintptr = (unsigned long )fptr ;
54
68
@@ -69,14 +83,14 @@ void test_cast_to_intptr() {
69
83
// ZERO-NOT: @llvm.ptrauth.resign
70
84
}
71
85
72
- // CHECK-LABEL: define void @test_function_to_function_cast
86
+ // CHECK-LABEL: define{{.*}} void @test_function_to_function_cast
73
87
void test_function_to_function_cast () {
74
88
void (* fptr2 )(int ) = (void (* )(int ))fptr ;
75
89
// TYPE: call i64 @llvm.ptrauth.resign(i64 {{.*}}, i32 0, i64 18983, i32 0, i64 2712)
76
90
// ZERO-NOT: @llvm.ptrauth.resign
77
91
}
78
92
79
- // CHECK-LABEL: define void @test_call_lvalue_cast
93
+ // CHECK-LABEL: define{{.*}} void @test_call_lvalue_cast
80
94
void test_call_lvalue_cast () {
81
95
(* (void (* )(int ))f )(42 );
82
96
0 commit comments