update vec-shrink-panik test to allow panic_no_unwind in landingpads

This commit is contained in:
Erik Desjardins 2022-02-27 23:15:49 -05:00
parent 851fcc7a54
commit 0c78433749

View File

@ -16,6 +16,14 @@ pub fn shrink_to_fit(vec: &mut Vec<u32>) {
// CHECK-LABEL: @issue71861
#[no_mangle]
pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
// CHECK-NOT: panic
// Call to panic_no_unwind in case of double-panic is expected,
// but other panics are not.
// CHECK: cleanup
// CHECK-NEXT: ; call core::panicking::panic_no_unwind
// CHECK-NEXT: panic_no_unwind
// CHECK-NOT: panic
vec.into_boxed_slice()
}
@ -23,6 +31,17 @@ pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
// CHECK-LABEL: @issue75636
#[no_mangle]
pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
// CHECK-NOT: panic
// Call to panic_no_unwind in case of double-panic is expected,
// but other panics are not.
// CHECK: cleanup
// CHECK-NEXT: ; call core::panicking::panic_no_unwind
// CHECK-NEXT: panic_no_unwind
// CHECK-NOT: panic
iter.iter().copied().collect()
}
// CHECK: ; core::panicking::panic_no_unwind
// CHECK: declare void @{{.*}}panic_no_unwind