Skip to content

Commit a4ce010

Browse files
committed
fixup! codegen: Generate dbg_value for the ref statement
Rename `place_ref` to `local_ref`.
1 parent f8bfc83 commit a4ce010

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler/rustc_codegen_ssa/src/mir/statement.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
109109
pub(crate) fn codegen_stmt_debuginfo(&mut self, bx: &mut Bx, debuginfo: &StmtDebugInfo<'tcx>) {
110110
match debuginfo {
111111
StmtDebugInfo::AssignRef(dest, place) => {
112-
let place_ref = match self.locals[place.local] {
112+
let local_ref = match self.locals[place.local] {
113113
LocalRef::Place(place_ref) | LocalRef::UnsizedPlace(place_ref) => {
114114
Some(place_ref)
115115
}
@@ -130,18 +130,18 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
130130
// Only pointers can calculate addresses.
131131
bx.type_kind(bx.val_ty(place_ref.val.llval)) == TypeKind::Pointer
132132
});
133-
let assign_ref = match (place_ref, place.is_indirect_first_projection()) {
134-
(Some(place_ref), false) => {
135-
Some((place_ref.val, place_ref.layout, place.projection.as_slice()))
133+
let assign_ref = match (local_ref, place.is_indirect_first_projection()) {
134+
(Some(local_ref), false) => {
135+
Some((local_ref.val, local_ref.layout, place.projection.as_slice()))
136136
}
137-
(Some(place_ref), true) => {
138-
let projected_ty = place_ref
137+
(Some(local_ref), true) => {
138+
let projected_ty = local_ref
139139
.layout
140140
.ty
141141
.builtin_deref(true)
142-
.unwrap_or_else(|| bug!("deref of non-pointer {:?}", place_ref));
142+
.unwrap_or_else(|| bug!("deref of non-pointer {:?}", local_ref));
143143
let layout = bx.cx().layout_of(projected_ty);
144-
Some((place_ref.val, layout, &place.projection[1..]))
144+
Some((local_ref.val, layout, &place.projection[1..]))
145145
}
146146
_ => None,
147147
};

0 commit comments

Comments
 (0)