Skip to content

Commit

Permalink
Rollup merge of #106002 - krasimirgg:v0sym, r=tmiasko
Browse files Browse the repository at this point in the history
codegen tests: adapt patterns to also work with v0 symbol mangling

No functional changes intended.

These tests were failing under `new-symbol-mangling = true`, cf. https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/a.20few.20panic-abort.20tests.20fail.20under.20.60new-symbol-mangling.60.
This adapts the patterns to work in this case.
  • Loading branch information
matthiaskrgr authored Dec 22, 2022
2 parents 6a215ab + 9c9fa56 commit eb07d98
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 eb07d98

Please sign in to comment.