Skip to content

Commit 0c78433

Browse files
update vec-shrink-panik test to allow panic_no_unwind in landingpads
1 parent 851fcc7 commit 0c78433

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/test/codegen/vec-shrink-panik.rs

+19
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,32 @@ pub fn shrink_to_fit(vec: &mut Vec<u32>) {
1616
// CHECK-LABEL: @issue71861
1717
#[no_mangle]
1818
pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
19+
// CHECK-NOT: panic
20+
21+
// Call to panic_no_unwind in case of double-panic is expected,
22+
// but other panics are not.
23+
// CHECK: cleanup
24+
// CHECK-NEXT: ; call core::panicking::panic_no_unwind
25+
// CHECK-NEXT: panic_no_unwind
26+
1927
// CHECK-NOT: panic
2028
vec.into_boxed_slice()
2129
}
2230

2331
// CHECK-LABEL: @issue75636
2432
#[no_mangle]
2533
pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
34+
// CHECK-NOT: panic
35+
36+
// Call to panic_no_unwind in case of double-panic is expected,
37+
// but other panics are not.
38+
// CHECK: cleanup
39+
// CHECK-NEXT: ; call core::panicking::panic_no_unwind
40+
// CHECK-NEXT: panic_no_unwind
41+
2642
// CHECK-NOT: panic
2743
iter.iter().copied().collect()
2844
}
45+
46+
// CHECK: ; core::panicking::panic_no_unwind
47+
// CHECK: declare void @{{.*}}panic_no_unwind

0 commit comments

Comments
 (0)