summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
blob: 87c07279552f47590e054591033325011458f3ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
- // MIR for `main` before ConstDebugInfo
+ // MIR for `main` after ConstDebugInfo
  
  fn main() -> () {
      let mut _0: ();
      let _1: u8;
      let mut _5: u8;
      let mut _6: u8;
      let mut _7: u8;
      let mut _8: u8;
      let mut _14: u32;
      let mut _15: u32;
      scope 1 {
-         debug x => _1;
+         debug x => const 1_u8;
          let _2: u8;
          scope 2 {
-             debug y => _2;
+             debug y => const 2_u8;
              let _3: u8;
              scope 3 {
-                 debug z => _3;
+                 debug z => const 3_u8;
                  let _4: u8;
                  scope 4 {
-                     debug sum => _4;
+                     debug sum => const 6_u8;
                      let _9: &str;
                      scope 5 {
-                         debug s => _9;
+                         debug s => const "hello, world!";
                          let _10: (bool, bool, u32);
                          scope 6 {
                              debug f => _10;
                              let _11: std::option::Option<u16>;
                              scope 7 {
                                  debug o => _11;
                                  let _12: Point;
                                  scope 8 {
-                                     debug p => _12;
+                                     debug p => const Point {{ x: 32_u32, y: 32_u32 }};
                                      let _13: u32;
                                      scope 9 {
-                                         debug a => _13;
+                                         debug a => const 64_u32;
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }
  
      bb0: {
          StorageLive(_1);
          _1 = const 1_u8;
          StorageLive(_2);
          _2 = const 2_u8;
          StorageLive(_3);
          _3 = const 3_u8;
          StorageLive(_4);
          StorageLive(_5);
          StorageLive(_6);
          _6 = const 1_u8;
          StorageLive(_7);
          _7 = const 2_u8;
          _5 = const 3_u8;
          StorageDead(_7);
          StorageDead(_6);
          StorageLive(_8);
          _8 = const 3_u8;
          _4 = const 6_u8;
          StorageDead(_8);
          StorageDead(_5);
          StorageLive(_9);
          _9 = const "hello, world!";
          StorageLive(_10);
          _10 = (const true, const false, const 123_u32);
          StorageLive(_11);
          _11 = Option::<u16>::Some(const 99_u16);
          StorageLive(_12);
          _12 = const Point {{ x: 32_u32, y: 32_u32 }};
          StorageLive(_13);
          StorageLive(_14);
          _14 = const 32_u32;
          StorageLive(_15);
          _15 = const 32_u32;
          _13 = const 64_u32;
          StorageDead(_15);
          StorageDead(_14);
          _0 = const ();
          StorageDead(_13);
          StorageDead(_12);
          StorageDead(_11);
          StorageDead(_10);
          StorageDead(_9);
          StorageDead(_4);
          StorageDead(_3);
          StorageDead(_2);
          StorageDead(_1);
          return;
      }
  }
  
  ALLOC0 (size: 8, align: 4) {
      20 00 00 00 20 00 00 00                         │  ... ...
  }