rust/tests/mir-opt/issue_41110.test.ElaborateDrops.panic-abort.diff

103 lines
2.1 KiB
Diff
Raw Normal View History

- // MIR for `test` before ElaborateDrops
+ // MIR for `test` after ElaborateDrops
fn test() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: S;
let _3: ();
let mut _4: S;
let mut _5: S;
+ let mut _6: bool;
scope 1 {
2023-06-06 08:47:00 -05:00
debug u => _1;
let mut _2: S;
scope 2 {
2023-06-06 08:47:00 -05:00
debug v => _2;
}
}
bb0: {
2023-06-06 08:47:00 -05:00
+ _6 = const false;
StorageLive(_1);
+ _6 = const true;
_1 = S;
StorageLive(_2);
_2 = S;
StorageLive(_3);
StorageLive(_4);
_4 = move _2;
_3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7];
}
bb1: {
2023-06-06 08:47:00 -05:00
StorageDead(_4);
StorageDead(_3);
StorageLive(_5);
+ _6 = const false;
_5 = move _1;
- drop(_2) -> [return: bb2, unwind: bb3];
+ goto -> bb2;
}
bb2: {
2023-06-06 08:47:00 -05:00
_2 = move _5;
- drop(_5) -> [return: bb4, unwind: bb8];
+ goto -> bb4;
}
bb3 (cleanup): {
2023-06-06 08:47:00 -05:00
_2 = move _5;
drop(_5) -> [return: bb8, unwind terminate];
}
bb4: {
2023-06-06 08:47:00 -05:00
StorageDead(_5);
_0 = const ();
drop(_2) -> [return: bb5, unwind: bb9];
}
bb5: {
2023-06-06 08:47:00 -05:00
StorageDead(_2);
- drop(_1) -> [return: bb6, unwind: bb10];
+ goto -> bb6;
}
bb6: {
2023-06-06 08:47:00 -05:00
+ _6 = const false;
StorageDead(_1);
return;
}
bb7 (cleanup): {
2023-06-06 08:47:00 -05:00
- drop(_4) -> [return: bb8, unwind terminate];
+ goto -> bb8;
}
bb8 (cleanup): {
2023-06-06 08:47:00 -05:00
- drop(_2) -> [return: bb9, unwind terminate];
+ goto -> bb9;
}
bb9 (cleanup): {
2023-06-06 08:47:00 -05:00
- drop(_1) -> [return: bb10, unwind terminate];
+ goto -> bb13;
}
bb10 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
+ }
+
+ bb11 (cleanup): {
2023-06-06 08:47:00 -05:00
+ unreachable;
+ }
+
+ bb12 (cleanup): {
2023-06-06 08:47:00 -05:00
+ drop(_1) -> [return: bb10, unwind terminate];
2023-04-05 03:17:40 -05:00
+ }
+
+ bb13 (cleanup): {
2023-06-06 08:47:00 -05:00
+ switchInt(_6) -> [0: bb10, otherwise: bb12];
}
}