about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-22 11:03:51 +0100
committerGitHub <noreply@github.com>2022-12-22 11:03:51 +0100
commiteb07d98648fe0a96280d2eb8827e7906f584ad77 (patch)
tree51da797dedc70eff0a443ed89bc463087b81effb /src/test/codegen
parent6a215ab9893d9fa9ed79c8bf79a6bd41d09467d6 (diff)
parent9c9fa567f8ca5bf43b481407ab78508652970594 (diff)
downloadrust-eb07d98648fe0a96280d2eb8827e7906f584ad77.tar.gz
rust-eb07d98648fe0a96280d2eb8827e7906f584ad77.zip
Rollup merge of #106002 - krasimirgg:v0sym, r=tmiasko
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.
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs3
-rw-r--r--src/test/codegen/unwind-and-panic-abort.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs b/src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
index 8447bbeb1ed..34fd401f9e4 100644
--- a/src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
+++ b/src/test/codegen/unwind-abis/c-unwind-abi-panic-abort.rs
@@ -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();
 }
 
diff --git a/src/test/codegen/unwind-and-panic-abort.rs b/src/test/codegen/unwind-and-panic-abort.rs
index f238741e599..b370191bf8c 100644
--- a/src/test/codegen/unwind-and-panic-abort.rs
+++ b/src/test/codegen/unwind-and-panic-abort.rs
@@ -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();