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/derefer_inline_test.main.Derefer.diff | |
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/derefer_inline_test.main.Derefer.diff')
-rw-r--r-- | src/test/mir-opt/derefer_inline_test.main.Derefer.diff | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/test/mir-opt/derefer_inline_test.main.Derefer.diff b/src/test/mir-opt/derefer_inline_test.main.Derefer.diff new file mode 100644 index 000000000..ce6ffaa56 --- /dev/null +++ b/src/test/mir-opt/derefer_inline_test.main.Derefer.diff @@ -0,0 +1,61 @@ +- // MIR for `main` before Derefer ++ // MIR for `main` after Derefer + + fn main() -> () { + let mut _0: (); // return place in scope 0 at $DIR/derefer_inline_test.rs:+0:11: +0:11 + let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + let mut _2: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + let mut _3: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + let mut _4: *mut u8; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + let mut _5: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + scope 1 { + } + + bb0: { + StorageLive(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + _2 = SizeOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + _3 = AlignOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + // mir::Constant + // + span: $DIR/derefer_inline_test.rs:10:5: 10:12 + // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) } + } + + bb1: { + StorageLive(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + _5 = ShallowInitBox(move _4, std::boxed::Box<u32>); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + (*_5) = f() -> [return: bb2, unwind: bb6]; // scope 0 at $DIR/derefer_inline_test.rs:+1:9: +1:12 + // mir::Constant + // + span: $DIR/derefer_inline_test.rs:10:9: 10:10 + // + literal: Const { ty: fn() -> Box<u32> {f}, val: Value(<ZST>) } + } + + bb2: { + _1 = move _5; // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12 + drop(_5) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12 + } + + bb3: { + StorageDead(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12 + drop(_1) -> bb4; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13 + } + + bb4: { + StorageDead(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13 + _0 = const (); // scope 0 at $DIR/derefer_inline_test.rs:+0:11: +2:2 + return; // scope 0 at $DIR/derefer_inline_test.rs:+2:2: +2:2 + } + + bb5 (cleanup): { + drop(_1) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13 + } + + bb6 (cleanup): { + drop(_5) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12 + } + + bb7 (cleanup): { + resume; // scope 0 at $DIR/derefer_inline_test.rs:+0:1: +2:2 + } + } + |