From 0c784337494223441d53129688bd777ae8df7992 Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Sun, 27 Feb 2022 23:15:49 -0500 Subject: [PATCH] update vec-shrink-panik test to allow panic_no_unwind in landingpads --- src/test/codegen/vec-shrink-panik.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/test/codegen/vec-shrink-panik.rs b/src/test/codegen/vec-shrink-panik.rs index 6b0ac78857a..18409014bde 100644 --- a/src/test/codegen/vec-shrink-panik.rs +++ b/src/test/codegen/vec-shrink-panik.rs @@ -16,6 +16,14 @@ pub fn shrink_to_fit(vec: &mut Vec) { // CHECK-LABEL: @issue71861 #[no_mangle] pub fn issue71861(vec: Vec) -> 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) -> 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