about summary refs log tree commit diff
path: root/tests/mir-opt/c_unwind_terminate.rs
blob: 64524e74d28e5890c0ef124778fb29db1cb30cab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//@ needs-unwind

struct Noise;
impl Drop for Noise {
    fn drop(&mut self) {
        eprintln!("Noisy Drop");
    }
}

fn panic() {
    panic!();
}

// EMIT_MIR c_unwind_terminate.test.AbortUnwindingCalls.after.mir
extern "C" fn test() {
    // CHECK-LABEL: fn test(
    // CHECK: drop
    // CHECK-SAME: unwind: [[unwind:bb.*]]]
    // CHECK: [[unwind]] (cleanup)
    // CHECK-NEXT: terminate(abi)
    let _val = Noise;
    panic();
}

fn main() {}