diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir')
-rw-r--r-- | src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir new file mode 100644 index 000000000..09765c7b9 --- /dev/null +++ b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir @@ -0,0 +1,84 @@ +// MIR for `main::{closure#0}` 0 generator_drop +/* generator_layout = GeneratorLayout { + field_tys: { + _0: std::string::String, + }, + variant_fields: { + Unresumed(0): [], + Returned (1): [], + Panicked (2): [], + Suspend0 (3): [_0], + }, + storage_conflicts: BitMatrix(1x1) { + (_0, _0), + }, +} */ + +fn main::{closure#0}(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 10:17]) -> () { + let mut _0: (); // return place in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + let mut _2: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + let _3: std::string::String; // in scope 0 at $DIR/generator-drop-cleanup.rs:+1:13: +1:15 + let _4: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:+2:9: +2:14 + let mut _5: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:+2:9: +2:14 + let mut _6: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:18: +0:18 + let mut _7: (); // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + let mut _8: u32; // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + scope 1 { + debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:+1:13: +1:15 + } + + bb0: { + _8 = discriminant((*_1)); // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + switchInt(move _8) -> [0_u32: bb7, 3_u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb1: { + StorageDead(_5); // scope 1 at $DIR/generator-drop-cleanup.rs:+2:13: +2:14 + StorageDead(_4); // scope 1 at $DIR/generator-drop-cleanup.rs:+2:14: +2:15 + drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + } + + bb2: { + nop; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + goto -> bb8; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + } + + bb3: { + return; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb4 (cleanup): { + resume; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb5 (cleanup): { + nop; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + goto -> bb4; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + } + + bb6: { + return; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb7: { + goto -> bb9; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb8: { + goto -> bb3; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6 + } + + bb9: { + goto -> bb6; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb10: { + StorageLive(_4); // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + StorageLive(_5); // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + goto -> bb1; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } + + bb11: { + return; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +0:17 + } +} |