rust/tests/mir-opt/issue_41110.main.ElaborateDrops.panic-unwind.diff

70 lines
1.5 KiB
Diff
Raw Normal View History

- // MIR for `main` before ElaborateDrops
+ // MIR for `main` after ElaborateDrops
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: ();
let mut _2: S;
let mut _3: S;
let mut _4: S;
+ let mut _5: bool;
scope 1 {
2023-06-06 08:47:00 -05:00
debug x => _1;
}
bb0: {
2023-06-06 08:47:00 -05:00
+ _5 = const false;
StorageLive(_1);
StorageLive(_2);
+ _5 = const true;
_2 = S;
StorageLive(_3);
StorageLive(_4);
_4 = S;
_3 = S::id(move _4) -> [return: bb1, unwind: bb4];
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageDead(_4);
+ _5 = const false;
_1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3];
}
bb2: {
2023-06-06 08:47:00 -05:00
StorageDead(_3);
+ _5 = const false;
StorageDead(_2);
_0 = const ();
StorageDead(_1);
return;
}
bb3 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_3) -> [return: bb5, unwind terminate(cleanup)];
2023-06-06 08:47:00 -05:00
+ goto -> bb5;
}
bb4 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_4) -> [return: bb5, unwind terminate(cleanup)];
2023-06-06 08:47:00 -05:00
+ goto -> bb5;
}
bb5 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_2) -> [return: bb6, unwind terminate(cleanup)];
2023-06-06 08:47:00 -05:00
+ goto -> bb8;
}
bb6 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
+ }
+
+ bb7 (cleanup): {
2023-08-24 07:26:26 -05:00
+ drop(_2) -> [return: bb6, unwind terminate(cleanup)];
+ }
+
+ bb8 (cleanup): {
2024-08-18 16:26:34 -05:00
+ switchInt(copy _5) -> [0: bb6, otherwise: bb7];
}
}