]> git.lizzy.rs Git - rust.git/blob - src/test/mir-opt/simplify_cfg.main.SimplifyCfg-initial.diff
Suppress "const" prefix of FnDef in MIR dump
[rust.git] / src / test / mir-opt / simplify_cfg.main.SimplifyCfg-initial.diff
1 - // MIR for `main` before SimplifyCfg-initial
2 + // MIR for `main` after SimplifyCfg-initial
3   
4   fn main() -> () {
5       let mut _0: ();                      // return place in scope 0 at $DIR/simplify_cfg.rs:5:11: 5:11
6       let mut _1: ();                      // in scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2
7       let mut _2: bool;                    // in scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
8       let mut _3: !;                       // in scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10
9   
10       bb0: {
11 -         goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
12 +         falseUnwind -> [real: bb1, cleanup: bb2]; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
13       }
14   
15       bb1: {
16 -         falseUnwind -> [real: bb3, cleanup: bb4]; // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
17 -     }
18
19 -     bb2: {
20 -         goto -> bb13;                    // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2
21 -     }
22
23 -     bb3: {
24           StorageLive(_2);                 // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
25 -         _2 = bar() -> [return: bb5, unwind: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
26 +         _2 = bar() -> [return: bb3, unwind: bb2]; // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
27                                            // mir::Constant
28                                            // + span: $DIR/simplify_cfg.rs:7:12: 7:15
29                                            // + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar(<ZST>)) }
30       }
31   
32 -     bb4 (cleanup): {
33 +     bb2 (cleanup): {
34           resume;                          // scope 0 at $DIR/simplify_cfg.rs:5:1: 11:2
35       }
36   
37 -     bb5: {
38 +     bb3: {
39           FakeRead(ForMatchedPlace, _2);   // scope 0 at $DIR/simplify_cfg.rs:7:12: 7:17
40 -         switchInt(_2) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
41 +         switchInt(_2) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
42       }
43   
44 -     bb6: {
45 -         falseEdge -> [real: bb8, imaginary: bb7]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
46 +     bb4: {
47 +         falseEdge -> [real: bb6, imaginary: bb5]; // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
48       }
49   
50 -     bb7: {
51 +     bb5: {
52           _1 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
53 -         goto -> bb12;                    // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
54 +         StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6
55 +         goto -> bb0;                     // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
56       }
57   
58 -     bb8: {
59 +     bb6: {
60           _0 = const ();                   // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18
61 -         goto -> bb9;                     // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18
62 -     }
63
64 -     bb9: {
65           StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6
66 -         goto -> bb2;                     // scope 0 at $DIR/simplify_cfg.rs:8:13: 8:18
67 -     }
68
69 -     bb10: {
70 -         unreachable;                     // scope 0 at $DIR/simplify_cfg.rs:7:18: 9:10
71 -     }
72
73 -     bb11: {
74 -         goto -> bb12;                    // scope 0 at $DIR/simplify_cfg.rs:7:9: 9:10
75 -     }
76
77 -     bb12: {
78 -         StorageDead(_2);                 // scope 0 at $DIR/simplify_cfg.rs:10:5: 10:6
79 -         goto -> bb1;                     // scope 0 at $DIR/simplify_cfg.rs:6:5: 10:6
80 -     }
81
82 -     bb13: {
83           return;                          // scope 0 at $DIR/simplify_cfg.rs:11:2: 11:2
84       }
85   }
86