Skip to content

Commit 70c6e79

Browse files
authored
[PAC][clang][test] Implement missing tests for some PAuth features (#100206)
Implement tests for the following PAuth-related features: - driver, preprocessor and ELF codegen tests for type_info vtable pointer discrimination #99726; - driver, preprocessor, and ELF codegen (emitting function attributes) + sema (emitting errors) tests for indirect gotos signing #97647; - ELF codegen tests for ubsan type checks + auth #99590; - ELF codegen tests for constant global init with polymorphic MI #99741; - ELF codegen tests for C++ member function pointers auth #99576.
1 parent c6e69b0 commit 70c6e79

9 files changed

+137
-73
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
18391839
Args.addOptInFlag(
18401840
CmdArgs, options::OPT_fptrauth_vtable_pointer_type_discrimination,
18411841
options::OPT_fno_ptrauth_vtable_pointer_type_discrimination);
1842+
Args.addOptInFlag(
1843+
CmdArgs, options::OPT_fptrauth_type_info_vtable_pointer_discrimination,
1844+
options::OPT_fno_ptrauth_type_info_vtable_pointer_discrimination);
18421845
Args.addOptInFlag(CmdArgs, options::OPT_fptrauth_init_fini,
18431846
options::OPT_fno_ptrauth_init_fini);
18441847
Args.addOptInFlag(

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS
55
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,CALLS
66

7-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS
8-
// RUN: %clang_cc1 -triple arm64e-apple-ios -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS
7+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS
8+
// RUN: %clang_cc1 -triple arm64e-apple-ios -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS
9+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-indirect-gotos -emit-llvm %s -o - | FileCheck %s --check-prefixes=ALL,GOTOS
910

1011
// ALL: define {{(dso_local )?}}void @test() #0
1112
void test() {

clang/test/CodeGen/ubsan-function.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// RUN: %clang_cc1 -triple aarch64_be-linux-gnu -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all | FileCheck %s --check-prefixes=CHECK,GNU,64
55
// RUN: %clang_cc1 -triple arm-none-eabi -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all | FileCheck %s --check-prefixes=CHECK,ARM,GNU,32
66

7-
// RUN: %clang_cc1 -triple arm64e-apple-ios -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all -fptrauth-calls | FileCheck %s --check-prefixes=CHECK,GNU,64,64e
7+
// RUN: %clang_cc1 -triple arm64e-apple-ios -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all -fptrauth-calls | FileCheck %s --check-prefixes=CHECK,GNU,64,AUTH
8+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -emit-llvm -o - %s -fsanitize=function -fno-sanitize-recover=all -fptrauth-calls | FileCheck %s --check-prefixes=CHECK,GNU,64,AUTH
89

910
// GNU: define{{.*}} void @_Z3funv() #0 !func_sanitize ![[FUNCSAN:.*]] {
1011
// MSVC: define{{.*}} void @"?fun@@YAXXZ"() #0 !func_sanitize ![[FUNCSAN:.*]] {
@@ -15,8 +16,8 @@ void fun() {}
1516
// ARM: ptrtoint ptr {{.*}} to i32, !nosanitize !5
1617
// ARM: and i32 {{.*}}, -2, !nosanitize !5
1718
// ARM: inttoptr i32 {{.*}} to ptr, !nosanitize !5
18-
// 64e: %[[STRIPPED:.*]] = ptrtoint ptr {{.*}} to i64, !nosanitize
19-
// 64e: call i64 @llvm.ptrauth.auth(i64 %[[STRIPPED]], i32 0, i64 0), !nosanitize
19+
// AUTH: %[[STRIPPED:.*]] = ptrtoint ptr {{.*}} to i64, !nosanitize
20+
// AUTH: call i64 @llvm.ptrauth.auth(i64 %[[STRIPPED]], i32 0, i64 0), !nosanitize
2021
// CHECK: getelementptr <{ i32, i32 }>, ptr {{.*}}, i32 -1, i32 0, !nosanitize
2122
// CHECK: load i32, ptr {{.*}}, align {{.*}}, !nosanitize
2223
// CHECK: icmp eq i32 {{.*}}, -1056584962, !nosanitize

clang/test/CodeGenCXX/ptrauth-global-constant-initializers.cpp

Lines changed: 44 additions & 33 deletions
Large diffs are not rendered by default.

clang/test/CodeGenCXX/ptrauth-member-function-pointer.cpp

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -o - %s | FileCheck -check-prefixes=CHECK,NODEBUG %s
2-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -debug-info-kind=limited -o - %s | FileCheck -check-prefixes=CHECK %s
3-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 1 -o - %s | FileCheck %s -check-prefix=STACK-PROT
4-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 2 -o - %s | FileCheck %s -check-prefix=STACK-PROT
5-
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 3 -o - %s | FileCheck %s -check-prefix=STACK-PROT
1+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -o - %s | FileCheck -check-prefixes=CHECK,NODEBUG,DARWIN %s
2+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -debug-info-kind=limited -o - %s | FileCheck -check-prefixes=CHECK,DARWIN %s
3+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 1 -o - %s | FileCheck %s -check-prefix=STACK-PROT
4+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 2 -o - %s | FileCheck %s -check-prefix=STACK-PROT
5+
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 3 -o - %s | FileCheck %s -check-prefix=STACK-PROT
6+
7+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -o - %s | FileCheck -check-prefixes=CHECK,NODEBUG,ELF %s
8+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -debug-info-kind=limited -o - %s | FileCheck -check-prefixes=CHECK,ELF %s
9+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 1 -o - %s | FileCheck %s -check-prefix=STACK-PROT
10+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 2 -o - %s | FileCheck %s -check-prefix=STACK-PROT
11+
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -emit-llvm -std=c++11 -O1 -disable-llvm-passes -stack-protector 3 -o - %s | FileCheck %s -check-prefix=STACK-PROT
612

713

814
// CHECK: @gmethod0 = global { i64, i64 } { i64 ptrtoint (ptr ptrauth (ptr @_ZN5Base011nonvirtual0Ev, i32 0, i64 [[TYPEDISC1:35591]]) to i64), i64 0 }, align 8
@@ -78,9 +84,9 @@ struct Class0 {
7884
MethodTy1 m0;
7985
};
8086

81-
// CHECK: define void @_ZN5Base08virtual1Ev(
87+
// CHECK: define{{.*}} void @_ZN5Base08virtual1Ev(
8288

83-
// CHECK: define void @_Z5test0v()
89+
// CHECK: define{{.*}} void @_Z5test0v()
8490
// CHECK: %[[METHOD0:.*]] = alloca { i64, i64 }, align 8
8591
// CHECK-NEXT: %[[VARMETHOD1:.*]] = alloca { i64, i64 }, align 8
8692
// CHECK-NEXT: %[[METHOD2:.*]] = alloca { i64, i64 }, align 8
@@ -246,7 +252,7 @@ void test0() {
246252
method7 = &Derived1::virtual1;
247253
}
248254

249-
// CHECK: define void @_Z5test1P5Base0MS_FvvE(ptr noundef %[[A0:.*]], [2 x i64] %[[A1_COERCE:.*]])
255+
// CHECK: define{{.*}} void @_Z5test1P5Base0MS_FvvE(ptr noundef %[[A0:.*]], [2 x i64] %[[A1_COERCE:.*]])
250256
// CHECK: %[[A1:.*]] = alloca { i64, i64 }, align 8
251257
// CHECK: %[[A0_ADDR:.*]] = alloca ptr, align 8
252258
// CHECK: %[[A1_ADDR:.*]] = alloca { i64, i64 }, align 8
@@ -264,15 +270,16 @@ void test0() {
264270
// CHECK: %[[MEMPTR_ISVIRTUAL:.*]] = icmp ne i64 %[[V5]], 0
265271
// CHECK: br i1 %[[MEMPTR_ISVIRTUAL]]
266272

267-
// CHECK: %[[VTABLE:.*]] = load ptr, ptr %[[V4]], align 8
268-
// CHECK: %[[V7:.*]] = ptrtoint ptr %[[VTABLE]] to i64
269-
// CHECK: %[[V8:.*]] = call i64 @llvm.ptrauth.auth(i64 %[[V7]], i32 2, i64 0)
270-
// CHECK: %[[V9:.*]] = inttoptr i64 %[[V8]] to ptr
271-
// CHECK: %[[V10:.*]] = trunc i64 %[[MEMPTR_PTR]] to i32
272-
// CHECK: %[[V11:.*]] = zext i32 %[[V10]] to i64
273-
// CHECK: %[[V12:.*]] = getelementptr i8, ptr %[[V9]], i64 %[[V11]]
274-
// CHECK: %[[MEMPTR_VIRTUALFN:.*]] = load ptr, ptr %[[V12]], align 8
275-
// CHECK: br
273+
// CHECK: %[[VTABLE:.*]] = load ptr, ptr %[[V4]], align 8
274+
// CHECK: %[[V7:.*]] = ptrtoint ptr %[[VTABLE]] to i64
275+
// CHECK: %[[V8:.*]] = call i64 @llvm.ptrauth.auth(i64 %[[V7]], i32 2, i64 0)
276+
// CHECK: %[[V9:.*]] = inttoptr i64 %[[V8]] to ptr
277+
// DARWIN: %[[V10:.*]] = trunc i64 %[[MEMPTR_PTR]] to i32
278+
// DARWIN: %[[V11:.*]] = zext i32 %[[V10]] to i64
279+
// DARWIN: %[[V12:.*]] = getelementptr i8, ptr %[[V9]], i64 %[[V11]]
280+
// ELF: %[[V12:.*]] = getelementptr i8, ptr %[[V9]], i64 %[[MEMPTR_PTR]]
281+
// CHECK: %[[MEMPTR_VIRTUALFN:.*]] = load ptr, ptr %[[V12]], align 8
282+
// CHECK: br
276283

277284
// CHECK: %[[MEMPTR_NONVIRTUALFN:.*]] = inttoptr i64 %[[MEMPTR_PTR]] to ptr
278285
// CHECK: br
@@ -286,7 +293,7 @@ void test1(Base0 *a0, MethodTy0 a1) {
286293
(a0->*a1)();
287294
}
288295

289-
// CHECK: define void @_Z15testConversion0M5Base0FvvEM8Derived0FvvE([2 x i64] %[[METHOD0_COERCE:.*]], [2 x i64] %[[METHOD1_COERCE:.*]])
296+
// CHECK: define{{.*}} void @_Z15testConversion0M5Base0FvvEM8Derived0FvvE([2 x i64] %[[METHOD0_COERCE:.*]], [2 x i64] %[[METHOD1_COERCE:.*]])
290297
// CHECK: %[[METHOD0:.*]] = alloca { i64, i64 }, align 8
291298
// CHECK: %[[METHOD1:.*]] = alloca { i64, i64 }, align 8
292299
// CHECK: %[[METHOD0_ADDR:.*]] = alloca { i64, i64 }, align 8
@@ -326,21 +333,21 @@ void testConversion0(MethodTy0 method0, MethodTy1 method1) {
326333
method1 = method0;
327334
}
328335

329-
// CHECK: define void @_Z15testConversion1M5Base0FvvE(
336+
// CHECK: define{{.*}} void @_Z15testConversion1M5Base0FvvE(
330337
// CHECK: call i64 @llvm.ptrauth.resign(i64 %{{.*}}, i32 0, i64 [[TYPEDISC0]], i32 0, i64 [[TYPEDISC1]])
331338

332339
void testConversion1(MethodTy0 method0) {
333340
MethodTy1 method1 = reinterpret_cast<MethodTy1>(method0);
334341
}
335342

336-
// CHECK: define void @_Z15testConversion2M8Derived0FvvE(
343+
// CHECK: define{{.*}} void @_Z15testConversion2M8Derived0FvvE(
337344
// CHECK: call i64 @llvm.ptrauth.resign(i64 %{{.*}}, i32 0, i64 [[TYPEDISC1]], i32 0, i64 [[TYPEDISC0]])
338345

339346
void testConversion2(MethodTy1 method1) {
340347
MethodTy0 method0 = static_cast<MethodTy0>(method1);
341348
}
342349

343-
// CHECK: define void @_Z15testConversion3M8Derived0FvvE(
350+
// CHECK: define{{.*}} void @_Z15testConversion3M8Derived0FvvE(
344351
// CHECK: call i64 @llvm.ptrauth.resign(i64 %{{.*}}, i32 0, i64 [[TYPEDISC1]], i32 0, i64 [[TYPEDISC0]])
345352

346353
void testConversion3(MethodTy1 method1) {
@@ -350,7 +357,7 @@ void testConversion3(MethodTy1 method1) {
350357
// No need to call @llvm.ptrauth.resign if the source member function
351358
// pointer is a constant.
352359

353-
// CHECK: define void @_Z15testConversion4v(
360+
// CHECK: define{{.*}} void @_Z15testConversion4v(
354361
// CHECK: %[[METHOD0:.*]] = alloca { i64, i64 }, align 8
355362
// CHECK: store { i64, i64 } { i64 ptrtoint (ptr ptrauth (ptr @_ZN5Base08virtual1Ev_vfpthunk_, i32 0, i64 [[TYPEDISC0]]) to i64), i64 0 }, ptr %[[METHOD0]], align 8
356363
// CHECK: ret void
@@ -396,7 +403,7 @@ MethodTy1 gmethod0 = reinterpret_cast<MethodTy1>(&Base0::nonvirtual0);
396403
MethodTy0 gmethod1 = reinterpret_cast<MethodTy0>(&Derived0::nonvirtual5);
397404
MethodTy0 gmethod2 = reinterpret_cast<MethodTy0>(&Derived0::virtual1);
398405

399-
// CHECK-LABEL: define void @_Z13testArrayInitv()
406+
// CHECK-LABEL: define{{.*}} void @_Z13testArrayInitv()
400407
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %p0, ptr align 8 @__const._Z13testArrayInitv.p0, i64 16, i1 false)
401408
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %p1, ptr align 8 @__const._Z13testArrayInitv.p1, i64 16, i1 false)
402409
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %c0, ptr align 8 @__const._Z13testArrayInitv.c0, i64 16, i1 false)
@@ -424,7 +431,7 @@ void testArrayInit() {
424431
// STACK-PROT-NOT: sspreq
425432
// STACK-PROT-NEXT: attributes
426433

427-
// CHECK: define void @_Z15testConvertNullv(
434+
// CHECK: define{{.*}} void @_Z15testConvertNullv(
428435
// CHECK: %[[T:.*]] = alloca { i64, i64 },
429436
// store { i64, i64 } zeroinitializer, { i64, i64 }* %[[T]],
430437

clang/test/CodeGenCXX/ptrauth-type-info-vtable.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,26 @@
44
// RUN: -fptrauth-vtable-pointer-address-discrimination \
55
// RUN: %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NODISC
66

7+
// RUN: %clang_cc1 -DENABLE_TID=0 -I%S -std=c++11 -triple=aarch64-linux-gnu \
8+
// RUN: -fptrauth-calls -fptrauth-intrinsics \
9+
// RUN: -fptrauth-vtable-pointer-type-discrimination \
10+
// RUN: -fptrauth-vtable-pointer-address-discrimination \
11+
// RUN: %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,NODISC
12+
713
// RUN: %clang_cc1 -DENABLE_TID=1 -I%S -std=c++11 -triple=arm64e-apple-darwin \
814
// RUN: -fptrauth-calls -fptrauth-intrinsics \
915
// RUN: -fptrauth-vtable-pointer-type-discrimination \
1016
// RUN: -fptrauth-vtable-pointer-address-discrimination \
1117
// RUN: -fptrauth-type-info-vtable-pointer-discrimination \
1218
// RUN: %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,DISC
1319

20+
// RUN: %clang_cc1 -DENABLE_TID=1 -I%S -std=c++11 -triple=aarch64-linux-gnu \
21+
// RUN: -fptrauth-calls -fptrauth-intrinsics \
22+
// RUN: -fptrauth-vtable-pointer-type-discrimination \
23+
// RUN: -fptrauth-vtable-pointer-address-discrimination \
24+
// RUN: -fptrauth-type-info-vtable-pointer-discrimination \
25+
// RUN: %s -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,DISC
26+
1427
// copied from typeinfo
1528
namespace std {
1629

@@ -64,15 +77,15 @@ TestStruct::~TestStruct(){}
6477
extern "C" void test_vtable(std::type_info* t) {
6578
t->test_method();
6679
}
67-
// NODISC: define void @test_vtable(ptr noundef %t)
80+
// NODISC: define{{.*}} void @test_vtable(ptr noundef %t)
6881
// NODISC: [[T_ADDR:%.*]] = alloca ptr, align 8
6982
// NODISC: store ptr %t, ptr [[T_ADDR]], align 8
7083
// NODISC: [[T:%.*]] = load ptr, ptr [[T_ADDR]], align 8
7184
// NODISC: [[VPTR:%.*]] = load ptr, ptr [[T]], align 8
7285
// NODISC: [[CAST_VPTR:%.*]] = ptrtoint ptr [[VPTR]] to i64
7386
// NODISC: [[AUTHED:%.*]] = call i64 @llvm.ptrauth.auth(i64 [[CAST_VPTR]], i32 2, i64 0)
7487

75-
// DISC: define void @test_vtable(ptr noundef %t)
88+
// DISC: define{{.*}} void @test_vtable(ptr noundef %t)
7689
// DISC: [[T_ADDR:%.*]] = alloca ptr, align 8
7790
// DISC: store ptr %t, ptr [[T_ADDR]], align 8
7891
// DISC: [[T:%.*]] = load ptr, ptr [[T_ADDR]], align 8

clang/test/Driver/aarch64-ptrauth.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
// RUN: -fno-ptrauth-auth-traps -fptrauth-auth-traps \
1212
// RUN: -fno-ptrauth-vtable-pointer-address-discrimination -fptrauth-vtable-pointer-address-discrimination \
1313
// RUN: -fno-ptrauth-vtable-pointer-type-discrimination -fptrauth-vtable-pointer-type-discrimination \
14+
// RUN: -fno-ptrauth-type-info-vtable-pointer-discrimination -fptrauth-type-info-vtable-pointer-discrimination \
1415
// RUN: -fno-ptrauth-init-fini -fptrauth-init-fini \
16+
// RUN: -fno-ptrauth-indirect-gotos -fptrauth-indirect-gotos \
1517
// RUN: %s 2>&1 | FileCheck %s --check-prefix=ALL
16-
// ALL: "-cc1"{{.*}} "-fptrauth-intrinsics" "-fptrauth-calls" "-fptrauth-returns" "-fptrauth-auth-traps" "-fptrauth-vtable-pointer-address-discrimination" "-fptrauth-vtable-pointer-type-discrimination" "-fptrauth-init-fini"
18+
// ALL: "-cc1"{{.*}} "-fptrauth-intrinsics" "-fptrauth-calls" "-fptrauth-returns" "-fptrauth-auth-traps" "-fptrauth-vtable-pointer-address-discrimination" "-fptrauth-vtable-pointer-type-discrimination" "-fptrauth-type-info-vtable-pointer-discrimination" "-fptrauth-init-fini" "-fptrauth-indirect-gotos"
1719

1820
// RUN: %clang -### -c --target=aarch64-linux -mabi=pauthtest %s 2>&1 | FileCheck %s --check-prefix=PAUTHABI1
1921
// RUN: %clang -### -c --target=aarch64-linux-pauthtest %s 2>&1 | FileCheck %s --check-prefix=PAUTHABI1
@@ -34,13 +36,16 @@
3436

3537
// RUN: not %clang -### -c --target=x86_64 -fptrauth-intrinsics -fptrauth-calls -fptrauth-returns -fptrauth-auth-traps \
3638
// RUN: -fptrauth-vtable-pointer-address-discrimination -fptrauth-vtable-pointer-type-discrimination \
37-
// RUN: -fptrauth-init-fini %s 2>&1 | FileCheck %s --check-prefix=ERR1
39+
// RUN: -fptrauth-type-info-vtable-pointer-discrimination -fptrauth-indirect-gotos -fptrauth-init-fini %s 2>&1 | \
40+
// RUN: FileCheck %s --check-prefix=ERR1
3841
// ERR1: error: unsupported option '-fptrauth-intrinsics' for target '{{.*}}'
3942
// ERR1-NEXT: error: unsupported option '-fptrauth-calls' for target '{{.*}}'
4043
// ERR1-NEXT: error: unsupported option '-fptrauth-returns' for target '{{.*}}'
4144
// ERR1-NEXT: error: unsupported option '-fptrauth-auth-traps' for target '{{.*}}'
4245
// ERR1-NEXT: error: unsupported option '-fptrauth-vtable-pointer-address-discrimination' for target '{{.*}}'
4346
// ERR1-NEXT: error: unsupported option '-fptrauth-vtable-pointer-type-discrimination' for target '{{.*}}'
47+
// ERR1-NEXT: error: unsupported option '-fptrauth-type-info-vtable-pointer-discrimination' for target '{{.*}}'
48+
// ERR1-NEXT: error: unsupported option '-fptrauth-indirect-gotos' for target '{{.*}}'
4449
// ERR1-NEXT: error: unsupported option '-fptrauth-init-fini' for target '{{.*}}'
4550

4651
//// Only support PAuth ABI for Linux as for now.

0 commit comments

Comments
 (0)