]> git.proxmox.com Git - rustc.git/blame_incremental - src/test/codegen/personality_lifetimes.rs
Update unsuspicious file list
[rustc.git] / src / test / codegen / personality_lifetimes.rs
... / ...
CommitLineData
1// ignore-msvc
2// ignore-wasm32-bare compiled with panic=abort by default
3
4// compile-flags: -O -C no-prepopulate-passes
5
6#![crate_type="lib"]
7
8struct S;
9
10impl Drop for S {
11 fn drop(&mut self) {
12 }
13}
14
15fn might_unwind() {
16}
17
18// CHECK-LABEL: @test
19#[no_mangle]
20pub fn test() {
21 let _s = S;
22 // Check that the personality slot alloca gets a lifetime start in each cleanup block, not just
23 // in the first one.
24 // CHECK: [[SLOT:%[0-9]+]] = alloca { {{i8\*|ptr}}, i32 }
25 // CHECK-LABEL: cleanup:
26 // CHECK: call void @llvm.lifetime.start.{{.*}}({{.*}})
27 // CHECK-LABEL: cleanup1:
28 // CHECK: call void @llvm.lifetime.start.{{.*}}({{.*}})
29 might_unwind();
30 let _t = S;
31 might_unwind();
32}