rust/tests/mir-opt/unreachable_enum_branching.simple.UnreachableEnumBranching.panic-abort.diff

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

54 lines
1.1 KiB
Diff
Raw Normal View History

- // MIR for `simple` before UnreachableEnumBranching
+ // MIR for `simple` after UnreachableEnumBranching
2020-04-02 21:09:01 +00:00
2023-10-21 13:45:25 +00:00
fn simple() -> () {
2023-06-06 13:47:00 +00:00
let mut _0: ();
let _1: &str;
let mut _2: Test1;
let mut _3: isize;
let _4: &str;
let _5: &str;
2020-04-02 21:09:01 +00:00
bb0: {
2023-06-06 13:47:00 +00:00
StorageLive(_1);
StorageLive(_2);
_2 = Test1::C;
_3 = discriminant(_2);
2024-07-27 09:08:16 +00:00
- switchInt(move _3) -> [0: bb3, 1: bb2, otherwise: bb1];
+ switchInt(move _3) -> [0: bb5, 1: bb5, 2: bb1, otherwise: bb5];
2020-04-02 21:09:01 +00:00
}
bb1: {
2023-06-06 13:47:00 +00:00
StorageLive(_5);
_5 = const "C";
_1 = &(*_5);
StorageDead(_5);
2024-07-27 09:08:16 +00:00
goto -> bb4;
2020-04-02 21:09:01 +00:00
}
2024-07-27 09:08:16 +00:00
bb2: {
2023-06-06 13:47:00 +00:00
StorageLive(_4);
_4 = const "B(Empty)";
_1 = &(*_4);
StorageDead(_4);
2024-07-27 09:08:16 +00:00
goto -> bb4;
2020-04-02 21:09:01 +00:00
}
2024-07-27 09:08:16 +00:00
bb3: {
_1 = const "A(Empty)";
2024-07-27 09:08:16 +00:00
goto -> bb4;
}
2024-07-27 09:08:16 +00:00
bb4: {
2023-06-06 13:47:00 +00:00
StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
2024-07-27 09:08:16 +00:00
+ }
+
+ bb5: {
+ unreachable;
2020-04-02 21:09:01 +00:00
}
}