Skip to content

Commit ef63e88

Browse files
committed
rustc_codegen_ssa: use debug_introduce_local on Operand call results.
1 parent 6dff769 commit ef63e88

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/librustc_codegen_ssa/mir/block.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
11451145
let op = bx.load_operand(place);
11461146
place.storage_dead(bx);
11471147
self.locals[index] = LocalRef::Operand(Some(op));
1148+
self.debug_introduce_local(bx, index);
11481149
}
11491150
LocalRef::Operand(Some(op)) => {
11501151
assert!(op.layout.is_zst(), "assigning to initialized SSAtemp");
@@ -1186,6 +1187,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
11861187
let op = bx.load_operand(tmp);
11871188
tmp.storage_dead(bx);
11881189
self.locals[index] = LocalRef::Operand(Some(op));
1190+
self.debug_introduce_local(bx, index);
11891191
}
11901192
DirectOperand(index) => {
11911193
// If there is a cast, we have to store and reload.
@@ -1200,6 +1202,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
12001202
OperandRef::from_immediate_or_packed_pair(bx, llval, ret_abi.layout)
12011203
};
12021204
self.locals[index] = LocalRef::Operand(Some(op));
1205+
self.debug_introduce_local(bx, index);
12031206
}
12041207
}
12051208
}

src/test/codegen/naked-functions.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// ignore-tidy-linelength
2-
31
// compile-flags: -C no-prepopulate-passes
42

53
#![crate_type = "lib"]
@@ -61,19 +59,19 @@ pub fn naked_recursive() {
6159

6260
naked_empty();
6361

64-
// CHECK-NEXT: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_return()
62+
// CHECK-NEXT: %_4 = call i{{[0-9]+}} @naked_with_return()
6563

6664
// FIXME(#39685) Avoid one block per call.
6765
// CHECK-NEXT: br label %bb2
6866
// CHECK: bb2:
6967

70-
// CHECK-NEXT: %{{[0-9]+}} = call i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}} %{{[0-9]+}})
68+
// CHECK-NEXT: %_3 = call i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}} %_4)
7169

7270
// FIXME(#39685) Avoid one block per call.
7371
// CHECK-NEXT: br label %bb3
7472
// CHECK: bb3:
7573

76-
// CHECK-NEXT: call void @naked_with_args(i{{[0-9]+}} %{{[0-9]+}})
74+
// CHECK-NEXT: call void @naked_with_args(i{{[0-9]+}} %_3)
7775

7876
// FIXME(#39685) Avoid one block per call.
7977
// CHECK-NEXT: br label %bb4

0 commit comments

Comments
 (0)