Skip to content

Commit 1ce5dc8

Browse files
restore location in gcc alloca codegen
1 parent d46b688 commit 1ce5dc8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/rustc_codegen_gcc/src/builder.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,13 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
902902
let ty = self.cx.type_array(self.cx.type_i8(), size.bytes()).get_aligned(align.bytes());
903903
// TODO(antoyo): It might be better to return a LValue, but fixing the rustc API is non-trivial.
904904
self.stack_var_count.set(self.stack_var_count.get() + 1);
905-
self.current_func().new_local(None, ty, &format!("stack_var_{}", self.stack_var_count.get())).get_address(None)
905+
self.current_func()
906+
.new_local(
907+
self.location,
908+
ty,
909+
&format!("stack_var_{}", self.stack_var_count.get()),
910+
)
911+
.get_address(self.location)
906912
}
907913

908914
fn dynamic_alloca(&mut self, _len: RValue<'gcc>, _align: Align) -> RValue<'gcc> {

0 commit comments

Comments
 (0)