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

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

100 lines
2.1 KiB
Diff
Raw Permalink 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;
2023-08-24 07:26:26 -05:00
- drop(_5) -> [return: bb8, unwind terminate(cleanup)];
2023-08-16 13:19:48 -05:00
+ goto -> bb8;
}
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);
2023-06-23 11:53:09 -05:00
- drop(_1) -> [return: bb6, unwind continue];
2023-06-06 08:47:00 -05:00
+ goto -> bb6;
}
bb6: {
2023-06-06 08:47:00 -05:00
+ _6 = const false;
StorageDead(_1);
return;
}
bb7 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_4) -> [return: bb8, unwind terminate(cleanup)];
2023-06-06 08:47:00 -05:00
+ goto -> bb8;
}
bb8 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_2) -> [return: bb9, unwind terminate(cleanup)];
2023-06-06 08:47:00 -05:00
+ goto -> bb9;
}
bb9 (cleanup): {
2023-08-24 07:26:26 -05:00
- drop(_1) -> [return: bb10, unwind terminate(cleanup)];
+ goto -> bb12;
}
bb10 (cleanup): {
2023-06-06 08:47:00 -05:00
resume;
+ }
+
+ bb11 (cleanup): {
2023-08-24 07:26:26 -05:00
+ drop(_1) -> [return: bb10, unwind terminate(cleanup)];
2023-04-05 03:17:40 -05:00
+ }
+
+ bb12 (cleanup): {
+ switchInt(copy _6) -> [0: bb10, otherwise: bb11];
}
}