codegen tests: adapt patterns to also work with v0 symbol mangling

No functional changes intended.

These tests were failing under `new-symbol-mangling = true`.
This adapts the patterns to work in this case.
This commit is contained in:
Krasimir Georgiev 2022-12-21 14:19:04 +00:00
parent eb9e5e711d
commit 9c9fa567f8
2 changed files with 4 additions and 2 deletions

View file

@ -9,7 +9,8 @@
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]] // CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
#[no_mangle] #[no_mangle]
pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() { pub unsafe extern "C-unwind" fn rust_item_that_can_unwind() {
// CHECK: call void @_ZN4core9panicking15panic_no_unwind // Handle both legacy and v0 symbol mangling.
// CHECK: call void @{{.*core9panicking15panic_no_unwind}}
may_unwind(); may_unwind();
} }

View file

@ -9,7 +9,8 @@ extern "C-unwind" {
// CHECK: Function Attrs:{{.*}}nounwind // CHECK: Function Attrs:{{.*}}nounwind
// CHECK-NEXT: define{{.*}}void @foo // CHECK-NEXT: define{{.*}}void @foo
// CHECK: call void @_ZN4core9panicking15panic_no_unwind // Handle both legacy and v0 symbol mangling.
// CHECK: call void @{{.*core9panicking15panic_no_unwind}}
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn foo() { pub unsafe extern "C" fn foo() {
bar(); bar();