rust/tests/mir-opt/inline/asm_unwind.main.Inline.panic-unwind.diff

43 lines
857 B
Diff
Raw Normal View History

2022-10-07 06:59:26 -05:00
- // MIR for `main` before Inline
+ // MIR for `main` after Inline
fn main() -> () {
2023-06-06 08:47:00 -05:00
let mut _0: ();
let _1: ();
+ scope 1 (inlined foo) {
+ let _2: D;
2022-10-07 06:59:26 -05:00
+ scope 2 {
2023-06-06 08:47:00 -05:00
+ debug _d => const D;
2022-10-07 06:59:26 -05:00
+ scope 3 {
+ }
+ }
+ }
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_1);
2023-06-23 11:53:09 -05:00
- _1 = foo() -> [return: bb1, unwind continue];
2023-06-06 08:47:00 -05:00
+ StorageLive(_2);
+ asm!("", options(MAY_UNWIND)) -> [return: bb2, unwind: bb3];
2022-10-07 06:59:26 -05:00
}
bb1: {
2023-06-06 08:47:00 -05:00
+ StorageDead(_2);
StorageDead(_1);
_0 = const ();
return;
2022-10-07 06:59:26 -05:00
+ }
+
2023-01-25 10:55:30 -06:00
+ bb2: {
2023-06-23 11:53:09 -05:00
+ drop(_2) -> [return: bb1, unwind continue];
2023-01-25 10:55:30 -06:00
+ }
+
2022-10-07 06:59:26 -05:00
+ bb3 (cleanup): {
2023-08-24 07:26:26 -05:00
+ drop(_2) -> [return: bb4, unwind terminate(cleanup)];
2022-10-07 06:59:26 -05:00
+ }
+
+ bb4 (cleanup): {
2023-06-06 08:47:00 -05:00
+ resume;
2022-10-07 06:59:26 -05:00
}
}