Skip to content

Commit 17b3b97

Browse files
authored
Rollup merge of #105567 - TimNN:kcfi16, r=nikic
KCFI test: Also support LLVM 16 output With a regex we can support the LLVM 16 output now already (and there are some third-party build bots that test Rust with LLVM head, like https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds?branch=master). cc ```@rcvalle```
2 parents e5e4eef + 295f5f5 commit 17b3b97

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/test/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,21 @@ impl Copy for i32 {}
2020

2121
pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
2222
// CHECK-LABEL: define{{.*}}foo
23-
// FIXME(rcvalle): Change <unknown kind #36> to !kcfi_type when Rust is updated to LLVM 16
24-
// CHECK-SAME: {{.*}}!<unknown kind #36> ![[TYPE1:[0-9]+]]
23+
// CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
2524
// CHECK: call i32 %f(i32 %arg){{.*}}[ "kcfi"(i32 -1666898348) ]
2625
f(arg)
2726
}
2827

2928
pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
3029
// CHECK-LABEL: define{{.*}}bar
31-
// FIXME(rcvalle): Change <unknown kind #36> to !kcfi_type when Rust is updated to LLVM 16
32-
// CHECK-SAME: {{.*}}!<unknown kind #36> ![[TYPE2:[0-9]+]]
30+
// CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
3331
// CHECK: call i32 %f(i32 %arg1, i32 %arg2){{.*}}[ "kcfi"(i32 -1789026986) ]
3432
f(arg1, arg2)
3533
}
3634

3735
pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
3836
// CHECK-LABEL: define{{.*}}baz
39-
// FIXME(rcvalle): Change <unknown kind #36> to !kcfi_type when Rust is updated to LLVM 16
40-
// CHECK-SAME: {{.*}}!<unknown kind #36> ![[TYPE3:[0-9]+]]
37+
// CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
4138
// CHECK: call i32 %f(i32 %arg1, i32 %arg2, i32 %arg3){{.*}}[ "kcfi"(i32 1248878270) ]
4239
f(arg1, arg2, arg3)
4340
}

0 commit comments

Comments
 (0)