Skip to content

Commit

Permalink
codegen tests: adapt patterns to also work with v0 symbol mangling
Browse files Browse the repository at this point in the history
No functional changes intended.

These tests were failing under `new-symbol-mangling = true`.
This adapts the patterns to work in this case.
  • Loading branch information
krasimirgg committed Dec 21, 2022
1 parent eb9e5e7 commit 9c9fa56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// CHECK: @rust_item_that_can_unwind() unnamed_addr [[ATTR0:#[0-9]+]]
#[no_mangle]
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();
}

Expand Down
3 changes: 2 additions & 1 deletion src/test/codegen/unwind-and-panic-abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ extern "C-unwind" {

// CHECK: Function Attrs:{{.*}}nounwind
// 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]
pub unsafe extern "C" fn foo() {
bar();
Expand Down

0 comments on commit 9c9fa56

Please sign in to comment.