]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | // MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching |
2 | ||
3 | fn main() -> () { | |
064997fb FG |
4 | let mut _0: (); // return place in scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +0:11 |
5 | let _1: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6 | |
6 | let mut _2: Test1; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
7 | let mut _3: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+2:9: +2:20 | |
8 | let _4: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+3:24: +3:34 | |
9 | let _5: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24 | |
10 | let _6: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6 | |
11 | let mut _7: Test2; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
12 | let mut _8: isize; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+8:9: +8:17 | |
13 | let _9: &str; // in scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24 | |
ba9703b0 XL |
14 | |
15 | bb0: { | |
064997fb FG |
16 | StorageLive(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +5:6 |
17 | StorageLive(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
18 | Deinit(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
19 | discriminant(_2) = 2; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
20 | _3 = discriminant(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
f2b60f7d FG |
21 | switchInt(move _3) -> [2_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:5: +1:19 |
22 | } | |
23 | ||
24 | bb1: { | |
064997fb FG |
25 | StorageLive(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24 |
26 | _5 = const "C"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24 | |
ba9703b0 XL |
27 | // mir::Constant |
28 | // + span: $DIR/uninhabited_enum_branching.rs:23:21: 23:24 | |
04454e1e | 29 | // + literal: Const { ty: &str, val: Value(Slice(..)) } |
064997fb FG |
30 | _1 = &(*_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:21: +4:24 |
31 | StorageDead(_5); // scope 0 at $DIR/uninhabited_enum_branching.rs:+4:23: +4:24 | |
32 | StorageDead(_2); // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7 | |
33 | StorageDead(_1); // scope 0 at $DIR/uninhabited_enum_branching.rs:+5:6: +5:7 | |
34 | StorageLive(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +10:6 | |
35 | StorageLive(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
36 | Deinit(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
37 | discriminant(_7) = 0; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
38 | _8 = discriminant(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
f2b60f7d | 39 | switchInt(move _8) -> [4_isize: bb5, 5_isize: bb3, otherwise: bb4]; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:5: +7:19 |
ba9703b0 XL |
40 | } |
41 | ||
f2b60f7d FG |
42 | bb2: { |
43 | unreachable; // scope 0 at $DIR/uninhabited_enum_branching.rs:+1:11: +1:19 | |
44 | } | |
45 | ||
46 | bb3: { | |
064997fb FG |
47 | StorageLive(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24 |
48 | _9 = const "E"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24 | |
ba9703b0 XL |
49 | // mir::Constant |
50 | // + span: $DIR/uninhabited_enum_branching.rs:28:21: 28:24 | |
04454e1e | 51 | // + literal: Const { ty: &str, val: Value(Slice(..)) } |
064997fb FG |
52 | _6 = &(*_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:21: +9:24 |
53 | StorageDead(_9); // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24 | |
f2b60f7d | 54 | goto -> bb6; // scope 0 at $DIR/uninhabited_enum_branching.rs:+9:23: +9:24 |
ba9703b0 XL |
55 | } |
56 | ||
f2b60f7d FG |
57 | bb4: { |
58 | unreachable; // scope 0 at $DIR/uninhabited_enum_branching.rs:+7:11: +7:19 | |
59 | } | |
60 | ||
61 | bb5: { | |
064997fb | 62 | _6 = const "D"; // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24 |
ba9703b0 XL |
63 | // mir::Constant |
64 | // + span: $DIR/uninhabited_enum_branching.rs:27:21: 27:24 | |
04454e1e | 65 | // + literal: Const { ty: &str, val: Value(Slice(..)) } |
f2b60f7d | 66 | goto -> bb6; // scope 0 at $DIR/uninhabited_enum_branching.rs:+8:21: +8:24 |
ba9703b0 XL |
67 | } |
68 | ||
f2b60f7d | 69 | bb6: { |
064997fb FG |
70 | StorageDead(_7); // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7 |
71 | StorageDead(_6); // scope 0 at $DIR/uninhabited_enum_branching.rs:+10:6: +10:7 | |
72 | _0 = const (); // scope 0 at $DIR/uninhabited_enum_branching.rs:+0:11: +11:2 | |
73 | return; // scope 0 at $DIR/uninhabited_enum_branching.rs:+11:2: +11:2 | |
ba9703b0 XL |
74 | } |
75 | } |