Skip to content

Commit ad7f94e

Browse files
committed
Run tests with triple aarch64-linux-gnu
1 parent a8c8554 commit ad7f94e

11 files changed

+71
-56
lines changed

clang/test/AST/ast-dump-ptrauth-json.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -std=c++11 -ast-dump=json %s | FileCheck %s
2+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -std=c++11 -ast-dump=json %s | FileCheck %s
23

34
// CHECK: "name": "__builtin_ptrauth_type_discriminator",
45
// CHECK: "qualType": "int *__ptrauth(1,1,123)"

clang/test/CodeGen/ptrauth-debuginfo.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %clang_cc1 -triple arm64-apple-ios \
22
// RUN: -fptrauth-calls -fptrauth-intrinsics -emit-llvm -fblocks \
33
// RUN: %s -debug-info-kind=limited -o - | FileCheck %s
4+
// RUN: %clang_cc1 -triple aarch64-linux-gnu \
5+
// RUN: -fptrauth-calls -fptrauth-intrinsics -emit-llvm -fblocks \
6+
// RUN: %s -debug-info-kind=limited -o - | FileCheck %s
47

58
// Constant initializers for data pointers.
69
extern int external_int;

clang/test/CodeGen/ptrauth-qualifier-const-init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s
2+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s
23

34
// Constant initializers for data pointers.
45
extern int external_int;

clang/test/CodeGen/ptrauth-qualifier-function.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,TYPE %s
2+
// RUN: %clang_cc1 %s -fptrauth-function-pointer-type-discrimination -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,TYPE %s
23
// RUN: %clang_cc1 %s -triple arm64-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,ZERO %s
4+
// RUN: %clang_cc1 %s -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,ZERO %s
35
// RUN: %clang_cc1 -xc++ %s -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios13 -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,TYPE,CHECK-CXX %s
6+
// RUN: %clang_cc1 -xc++ %s -fptrauth-function-pointer-type-discrimination -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -disable-llvm-passes -emit-llvm -o- | FileCheck --check-prefixes=CHECK,TYPE,CHECK-CXX %s
47

58
#ifdef __cplusplus
69
extern "C" {
@@ -11,7 +14,7 @@ void (* __ptrauth(0, 0, 42) f2ptr_42_discm)(int);
1114
void f(int);
1215
void (* const __ptrauth(0, 0, 42) f_const_ptr)(int) = &f;
1316

14-
// CHECK-LABEL: define void @test_assign_to_qualified
17+
// CHECK-LABEL: define {{.*}}void @test_assign_to_qualified
1518
void test_assign_to_qualified() {
1619
f2ptr_42_discm = (void (*)(int))fptr;
1720

@@ -46,7 +49,7 @@ void test_assign_to_qualified() {
4649
// CHECK-NEXT store void (i32)* [[FPTR10]], void (i32)** @f2ptr_42_discm
4750
}
4851

49-
// CHECK-LABEL: define void @test_assign_from_qualified
52+
// CHECK-LABEL: define {{.*}}void @test_assign_from_qualified
5053
void test_assign_from_qualified() {
5154
fptr = (void (*)(void))f2ptr_42_discm;
5255

@@ -81,7 +84,7 @@ void test_assign_from_qualified() {
8184
// CHECK-NEXT store void ()* [[FPTR10]], void ()** @f2ptr_42_discm
8285
}
8386

84-
// CHECK-LABEL: define void @test_const_ptr_function_call()
87+
// CHECK-LABEL: define {{.*}}void @test_const_ptr_function_call()
8588
void test_const_ptr_function_call(void) {
8689
f_const_ptr(1);
8790

@@ -94,7 +97,7 @@ void (* get_fptr(void))(int);
9497
void (* __ptrauth(0, 0, 42) f_const_ptr2)(int) = get_fptr();
9598
void (* const __ptrauth(0, 1, 43) &f_ref)(int) = f_const_ptr2;
9699

97-
// CHECK-CXX-LABEL: define internal void @__cxx_global_var_init()
100+
// CHECK-CXX-LABEL: define {{.*}}internal void @__cxx_global_var_init()
98101
// CHECK-CXX: [[ENTRY:.*]]:
99102
// CHECK-CXX: %[[CALL:.*]] = call ptr @get_fptr()
100103
// CHECK-CXX: %[[V0:.*]] = icmp ne ptr %[[CALL]], null
@@ -110,7 +113,7 @@ void (* const __ptrauth(0, 1, 43) &f_ref)(int) = f_const_ptr2;
110113
// CHECK-CXX: %[[V4:.*]] = phi ptr [ null, %[[ENTRY]] ], [ %[[V3]], %[[RESIGN_NONNULL]] ]
111114
// CHECK-CXX: store ptr %[[V4]], ptr @f_const_ptr2, align 8
112115

113-
// CHECK-CXX-LABEL: define internal void @__cxx_global_var_init.1()
116+
// CHECK-CXX-LABEL: define {{.*}}internal void @__cxx_global_var_init.1()
114117
// CHECK-CXX: [[ENTRY:.*]]:
115118
// CHECK-CXX: %[[V0:.*]] = load ptr, ptr @f_const_ptr2, align 8
116119
// CHECK-CXX: %[[V1:.*]] = call i64 @llvm.ptrauth.blend(i64 ptrtoint (ptr @_ZGR5f_ref_ to i64), i64 43)
@@ -128,7 +131,7 @@ void (* const __ptrauth(0, 1, 43) &f_ref)(int) = f_const_ptr2;
128131
// CHECK-CXX: store ptr %[[V6]], ptr @_ZGR5f_ref_, align 8
129132
// CHECK-CXX: store ptr @_ZGR5f_ref_, ptr @f_ref, align 8
130133

131-
// CHECK-CXX-LABEL: define void @test_const_ptr_ref_function_call()
134+
// CHECK-CXX-LABEL: define {{.*}}void @test_const_ptr_ref_function_call()
132135
void test_const_ptr_ref_function_call(void) {
133136
f_ref(1);
134137

clang/test/CodeGen/ptrauth-qualifier-loadstore.c

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s
2+
// RUN: %clang_cc1 -fptrauth-function-pointer-type-discrimination -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s
23

34
#define IQ __ptrauth(1,0,50)
45
#define AQ __ptrauth(1,1,50)
@@ -22,7 +23,7 @@ extern void use_upf(func_t *ptr);
2223

2324
// Data with address-independent qualifiers.
2425

25-
// CHECK-LABEL: define void @test_store_data_i_constant()
26+
// CHECK-LABEL: define {{.*}}void @test_store_data_i_constant()
2627
void test_store_data_i_constant() {
2728
// CHECK: [[V:%.*]] = alloca ptr,
2829
// CHECK-NEXT: [[SIGN:%.*]] = call i64 @llvm.ptrauth.sign(i64 ptrtoint (ptr @external_int to i64), i32 1, i64 50)
@@ -36,7 +37,7 @@ void test_store_data_i_constant() {
3637
iqpi = &external_int;
3738
}
3839

39-
// CHECK-LABEL: define void @test_store_data_iu()
40+
// CHECK-LABEL: define {{.*}}void @test_store_data_iu()
4041
void test_store_data_iu() {
4142
// CHECK: [[V:%.*]] = alloca ptr,
4243
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_upi,
@@ -61,7 +62,7 @@ void test_store_data_iu() {
6162
iqpi = global_upi;
6263
}
6364

64-
// CHECK-LABEL: define void @test_store_data_ia()
65+
// CHECK-LABEL: define {{.*}}void @test_store_data_ia()
6566
void test_store_data_ia() {
6667
// CHECK: [[V:%.*]] = alloca ptr,
6768
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpi,
@@ -107,7 +108,7 @@ void test_store_data_ia() {
107108
use_upi(iqpi = global_aqpi);
108109
}
109110

110-
// CHECK-LABEL: define void @test_store_data_ii_same()
111+
// CHECK-LABEL: define {{.*}}void @test_store_data_ii_same()
111112
void test_store_data_ii_same() {
112113
// CHECK: [[V:%.*]] = alloca ptr,
113114
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpi,
@@ -118,7 +119,7 @@ void test_store_data_ii_same() {
118119
iqpi = global_iqpi;
119120
}
120121

121-
// CHECK-LABEL: define void @test_store_data_ii_different()
122+
// CHECK-LABEL: define {{.*}}void @test_store_data_ii_different()
122123
void test_store_data_ii_different() {
123124
// CHECK: [[V:%.*]] = alloca ptr,
124125
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpi,
@@ -143,7 +144,7 @@ void test_store_data_ii_different() {
143144
iqpi = global_iqpi;
144145
}
145146

146-
// CHECK-LABEL: define void @test_store_data_ii_zero()
147+
// CHECK-LABEL: define {{.*}}void @test_store_data_ii_zero()
147148
void test_store_data_ii_zero() {
148149
// CHECK: [[V:%.*]] = alloca ptr,
149150
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpi,
@@ -168,7 +169,7 @@ void test_store_data_ii_zero() {
168169
global_iqpi = iqpi;
169170
}
170171

171-
// CHECK-LABEL: define void @test_load_data_i()
172+
// CHECK-LABEL: define {{.*}}void @test_load_data_i()
172173
void test_load_data_i() {
173174
// CHECK: [[V:%.*]] = alloca ptr,
174175
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpi,
@@ -205,7 +206,7 @@ void test_load_data_i() {
205206

206207
// Data with address-discriminated qualifiers.
207208

208-
// CHECK-LABEL: define void @test_store_data_a_constant()
209+
// CHECK-LABEL: define {{.*}}void @test_store_data_a_constant()
209210
void test_store_data_a_constant() {
210211
// CHECK: [[V:%.*]] = alloca ptr,
211212
// CHECK-NEXT: [[T0:%.*]] = ptrtoint ptr [[V]] to i64
@@ -222,7 +223,7 @@ void test_store_data_a_constant() {
222223
aqpi = &external_int;
223224
}
224225

225-
// CHECK-LABEL: define void @test_store_data_au()
226+
// CHECK-LABEL: define {{.*}}void @test_store_data_au()
226227
void test_store_data_au() {
227228
// CHECK: [[V:%.*]] = alloca ptr,
228229
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_upi,
@@ -251,7 +252,7 @@ void test_store_data_au() {
251252
aqpi = global_upi;
252253
}
253254

254-
// CHECK-LABEL: define void @test_store_data_ai()
255+
// CHECK-LABEL: define {{.*}}void @test_store_data_ai()
255256
void test_store_data_ai() {
256257
// CHECK: [[V:%.*]] = alloca ptr,
257258
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpi,
@@ -280,7 +281,7 @@ void test_store_data_ai() {
280281
aqpi = global_iqpi;
281282
}
282283

283-
// CHECK-LABEL: define void @test_store_data_aa_same()
284+
// CHECK-LABEL: define {{.*}}void @test_store_data_aa_same()
284285
void test_store_data_aa_same() {
285286
// CHECK: [[V:%.*]] = alloca ptr,
286287
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpi,
@@ -311,7 +312,7 @@ void test_store_data_aa_same() {
311312
aqpi = global_aqpi;
312313
}
313314

314-
// CHECK-LABEL: define void @test_store_data_aa_different()
315+
// CHECK-LABEL: define {{.*}}void @test_store_data_aa_different()
315316
void test_store_data_aa_different() {
316317
// CHECK: [[V:%.*]] = alloca ptr,
317318
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpi,
@@ -342,7 +343,7 @@ void test_store_data_aa_different() {
342343
aqpi = global_aqpi;
343344
}
344345

345-
// CHECK-LABEL: define void @test_store_data_aa_zero()
346+
// CHECK-LABEL: define {{.*}}void @test_store_data_aa_zero()
346347
void test_store_data_aa_zero() {
347348
// CHECK: [[V:%.*]] = alloca ptr,
348349
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpi,
@@ -371,7 +372,7 @@ void test_store_data_aa_zero() {
371372
global_aqpi = aqpi;
372373
}
373374

374-
// CHECK-LABEL: define void @test_load_data_a()
375+
// CHECK-LABEL: define {{.*}}void @test_load_data_a()
375376
void test_load_data_a() {
376377
// CHECK: [[V:%.*]] = alloca ptr,
377378
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpi,
@@ -411,7 +412,7 @@ void test_load_data_a() {
411412

412413
// Function with address-independent qualifiers.
413414

414-
// CHECK-LABEL: define void @test_store_function_i_constant()
415+
// CHECK-LABEL: define {{.*}}void @test_store_function_i_constant()
415416
void test_store_function_i_constant() {
416417
// CHECK: [[V:%.*]] = alloca ptr,
417418
// CHECK-NEXT: [[SIGN:%.*]] = call i64 @llvm.ptrauth.resign(i64 ptrtoint (ptr ptrauth (ptr @external_func, i32 0, i64 18983) to i64), i32 0, i64 18983, i32 1, i64 50)
@@ -424,7 +425,7 @@ void test_store_function_i_constant() {
424425
iqpf = &external_func;
425426
}
426427

427-
// CHECK-LABEL: define void @test_store_function_iu()
428+
// CHECK-LABEL: define {{.*}}void @test_store_function_iu()
428429
void test_store_function_iu() {
429430
// CHECK: [[V:%.*]] = alloca ptr,
430431
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_upf,
@@ -449,7 +450,7 @@ void test_store_function_iu() {
449450
iqpf = global_upf;
450451
}
451452

452-
// CHECK-LABEL: define void @test_store_function_ia()
453+
// CHECK-LABEL: define {{.*}}void @test_store_function_ia()
453454
void test_store_function_ia() {
454455
// CHECK: [[V:%.*]] = alloca ptr,
455456
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpf,
@@ -495,7 +496,7 @@ void test_store_function_ia() {
495496
use_upf(iqpf = global_aqpf);
496497
}
497498

498-
// CHECK-LABEL: define void @test_store_function_ii_same()
499+
// CHECK-LABEL: define {{.*}}void @test_store_function_ii_same()
499500
void test_store_function_ii_same() {
500501
// CHECK: [[V:%.*]] = alloca ptr,
501502
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpf,
@@ -506,7 +507,7 @@ void test_store_function_ii_same() {
506507
iqpf = global_iqpf;
507508
}
508509

509-
// CHECK-LABEL: define void @test_store_function_ii_different()
510+
// CHECK-LABEL: define {{.*}}void @test_store_function_ii_different()
510511
void test_store_function_ii_different() {
511512
// CHECK: [[V:%.*]] = alloca ptr,
512513
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpf,
@@ -531,7 +532,7 @@ void test_store_function_ii_different() {
531532
iqpf = global_iqpf;
532533
}
533534

534-
// CHECK-LABEL: define void @test_load_function_i()
535+
// CHECK-LABEL: define {{.*}}void @test_load_function_i()
535536
void test_load_function_i() {
536537
// CHECK: [[V:%.*]] = alloca ptr,
537538
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpf,
@@ -568,7 +569,7 @@ void test_load_function_i() {
568569

569570
// Function with address-discriminated qualifiers.
570571

571-
// CHECK-LABEL: define void @test_store_function_a_constant()
572+
// CHECK-LABEL: define {{.*}}void @test_store_function_a_constant()
572573
void test_store_function_a_constant() {
573574
// CHECK: [[V:%.*]] = alloca ptr,
574575
// CHECK-NEXT: [[T0:%.*]] = ptrtoint ptr [[V]] to i64
@@ -585,7 +586,7 @@ void test_store_function_a_constant() {
585586
aqpf = &external_func;
586587
}
587588

588-
// CHECK-LABEL: define void @test_store_function_au()
589+
// CHECK-LABEL: define {{.*}}void @test_store_function_au()
589590
void test_store_function_au() {
590591
// CHECK: [[V:%.*]] = alloca ptr,
591592
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_upf,
@@ -614,7 +615,7 @@ void test_store_function_au() {
614615
aqpf = global_upf;
615616
}
616617

617-
// CHECK-LABEL: define void @test_store_function_ai()
618+
// CHECK-LABEL: define {{.*}}void @test_store_function_ai()
618619
void test_store_function_ai() {
619620
// CHECK: [[V:%.*]] = alloca ptr,
620621
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_iqpf,
@@ -643,7 +644,7 @@ void test_store_function_ai() {
643644
aqpf = global_iqpf;
644645
}
645646

646-
// CHECK-LABEL: define void @test_store_function_aa_same()
647+
// CHECK-LABEL: define {{.*}}void @test_store_function_aa_same()
647648
void test_store_function_aa_same() {
648649
// CHECK: [[V:%.*]] = alloca ptr,
649650
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpf,
@@ -674,7 +675,7 @@ void test_store_function_aa_same() {
674675
aqpf = global_aqpf;
675676
}
676677

677-
// CHECK-LABEL: define void @test_store_function_aa_different()
678+
// CHECK-LABEL: define {{.*}}void @test_store_function_aa_different()
678679
void test_store_function_aa_different() {
679680
// CHECK: [[V:%.*]] = alloca ptr,
680681
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpf,
@@ -705,7 +706,7 @@ void test_store_function_aa_different() {
705706
aqpf = global_aqpf;
706707
}
707708

708-
// CHECK-LABEL: define void @test_load_function_a()
709+
// CHECK-LABEL: define {{.*}}void @test_load_function_a()
709710
void test_load_function_a() {
710711
// CHECK: [[V:%.*]] = alloca ptr,
711712
// CHECK-NEXT: [[LOAD:%.*]] = load ptr, ptr @global_aqpf,

0 commit comments

Comments
 (0)