rust/tests/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.panic-unwind.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.2 KiB
Rust
Raw Normal View History

2020-04-02 21:09:01 +00:00
// MIR for `main` after SimplifyCfg-elaborate-drops
fn main() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let mut _1: Packed;
let mut _2: Aligned;
let mut _3: Droppy;
let mut _4: Aligned;
let mut _5: Droppy;
let mut _6: Aligned;
2020-04-02 21:09:01 +00:00
scope 1 {
2023-06-06 13:47:00 +00:00
debug x => _1;
2020-04-02 21:09:01 +00:00
}
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
StorageLive(_2);
StorageLive(_3);
_3 = Droppy(const 0_usize);
_2 = Aligned(move _3);
StorageDead(_3);
_1 = Packed(move _2);
StorageDead(_2);
StorageLive(_4);
StorageLive(_5);
_5 = Droppy(const 0_usize);
_4 = Aligned(move _5);
StorageDead(_5);
StorageLive(_6);
_6 = move (_1.0: Aligned);
drop(_6) -> [return: bb4, unwind: bb1];
2020-04-02 21:09:01 +00:00
}
bb1 (cleanup): {
2023-06-06 13:47:00 +00:00
(_1.0: Aligned) = move _4;
drop(_1) -> [return: bb3, unwind terminate (panic in a destructor during cleanup)];
2020-05-02 18:59:05 +00:00
}
bb2: {
2023-06-06 13:47:00 +00:00
StorageDead(_1);
return;
2020-10-02 20:11:24 +00:00
}
2020-04-02 21:09:01 +00:00
bb3 (cleanup): {
2023-06-06 13:47:00 +00:00
resume;
2020-04-02 21:09:01 +00:00
}
bb4: {
2023-06-06 13:47:00 +00:00
StorageDead(_6);
(_1.0: Aligned) = move _4;
StorageDead(_4);
_0 = const ();
drop(_1) -> [return: bb2, unwind: bb3];
2020-04-02 21:09:01 +00:00
}
}