1
+ // revisions: old new
2
+ // LLVM 17 realizes double panic is not possible and doesn't generate calls
3
+ // to panic_cannot_unwind.
4
+ // [old]ignore-llvm-version: 17 - 99
5
+ // [new]min-llvm-version: 17
1
6
// compile-flags: -O
2
7
// ignore-debug: the debug assertions get in the way
3
8
#![ crate_type = "lib" ]
@@ -18,11 +23,11 @@ pub fn shrink_to_fit(vec: &mut Vec<u32>) {
18
23
pub fn issue71861 ( vec : Vec < u32 > ) -> Box < [ u32 ] > {
19
24
// CHECK-NOT: panic
20
25
21
- // Call to panic_cannot_unwind in case of double-panic is expected,
22
- // but other panics are not.
26
+ // Call to panic_cannot_unwind in case of double-panic is expected
27
+ // on LLVM 16 and older, but other panics are not.
23
28
// CHECK: cleanup
24
- // CHECK -NEXT: ; call core::panicking::panic_cannot_unwind
25
- // CHECK -NEXT: panic_cannot_unwind
29
+ // old -NEXT: ; call core::panicking::panic_cannot_unwind
30
+ // old -NEXT: panic_cannot_unwind
26
31
27
32
// CHECK-NOT: panic
28
33
vec. into_boxed_slice ( )
@@ -34,14 +39,14 @@ pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
34
39
// CHECK-NOT: panic
35
40
36
41
// Call to panic_cannot_unwind in case of double-panic is expected,
37
- // but other panics are not.
42
+ // on LLVM 16 and older, but other panics are not.
38
43
// CHECK: cleanup
39
- // CHECK -NEXT: ; call core::panicking::panic_cannot_unwind
40
- // CHECK -NEXT: panic_cannot_unwind
44
+ // old -NEXT: ; call core::panicking::panic_cannot_unwind
45
+ // old -NEXT: panic_cannot_unwind
41
46
42
47
// CHECK-NOT: panic
43
48
iter. iter ( ) . copied ( ) . collect ( )
44
49
}
45
50
46
- // CHECK : ; core::panicking::panic_cannot_unwind
47
- // CHECK : declare void @{{.*}}panic_cannot_unwind
51
+ // old : ; core::panicking::panic_cannot_unwind
52
+ // old : declare void @{{.*}}panic_cannot_unwind
0 commit comments