summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/inline/asm_unwind.main.Inline.diff
blob: ba1bfec05d21831bbfe7ce1077c011d9f5203947 (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
- // MIR for `main` before Inline
+ // MIR for `main` after Inline
  
  fn main() -> () {
      let mut _0: ();                      // return place in scope 0 at $DIR/asm_unwind.rs:+0:15: +0:15
      let _1: ();                          // in scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
+     scope 1 (inlined foo) {              // at $DIR/asm_unwind.rs:21:5: 21:10
+         let _2: D;                       // in scope 1 at $DIR/asm_unwind.rs:15:9: 15:11
+         scope 2 {
+             debug _d => const D;         // in scope 2 at $DIR/asm_unwind.rs:15:9: 15:11
+             scope 3 {
+             }
+         }
+     }
  
      bb0: {
          StorageLive(_1);                 // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
-         _1 = foo() -> bb1;               // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
-                                          // mir::Constant
-                                          // + span: $DIR/asm_unwind.rs:21:5: 21:8
-                                          // + literal: Const { ty: fn() {foo}, val: Value(<ZST>) }
+         StorageLive(_2);                 // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
+         asm!("", options(MAY_UNWIND)) -> [return: bb2, unwind: bb3]; // scope 3 at $DIR/asm_unwind.rs:16:14: 16:54
      }
  
      bb1: {
+         StorageDead(_2);                 // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
          StorageDead(_1);                 // scope 0 at $DIR/asm_unwind.rs:+1:10: +1:11
          _0 = const ();                   // scope 0 at $DIR/asm_unwind.rs:+0:15: +2:2
          return;                          // scope 0 at $DIR/asm_unwind.rs:+2:2: +2:2
+     }
+ 
+     bb2: {
+         drop(_2) -> bb1;                 // scope 1 at $DIR/asm_unwind.rs:17:1: 17:2
+     }
+ 
+     bb3 (cleanup): {
+         drop(_2) -> [return: bb4, unwind terminate]; // scope 1 at $DIR/asm_unwind.rs:17:1: 17:2
+     }
+ 
+     bb4 (cleanup): {
+         resume;                          // scope 1 at $DIR/asm_unwind.rs:14:1: 17:2
      }
  }