diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2024-04-12 08:29:06 -0400 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2024-04-12 08:36:22 -0400 |
| commit | 1ce5dc8d9c638194306e63abfe81748c77e7386e (patch) | |
| tree | 58f1afb95ef6f19b02853efdef326d4d01e15d08 /compiler/rustc_codegen_gcc | |
| parent | d46b6889451de69a9cf7808a042d8292fc2c341a (diff) | |
| download | rust-1ce5dc8d9c638194306e63abfe81748c77e7386e.tar.gz rust-1ce5dc8d9c638194306e63abfe81748c77e7386e.zip | |
restore location in gcc alloca codegen
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/builder.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index cf1aa3f4793..8d6c16ebe04 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -902,7 +902,13 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { let ty = self.cx.type_array(self.cx.type_i8(), size.bytes()).get_aligned(align.bytes()); // TODO(antoyo): It might be better to return a LValue, but fixing the rustc API is non-trivial. self.stack_var_count.set(self.stack_var_count.get() + 1); - self.current_func().new_local(None, ty, &format!("stack_var_{}", self.stack_var_count.get())).get_address(None) + self.current_func() + .new_local( + self.location, + ty, + &format!("stack_var_{}", self.stack_var_count.get()), + ) + .get_address(self.location) } fn dynamic_alloca(&mut self, _len: RValue<'gcc>, _align: Align) -> RValue<'gcc> { |
