Eagerly convert some ctors to use their specialized ctors

This commit is contained in:
Michael Goulet 2024-03-21 16:50:21 -04:00
parent 24db8eaefd
commit 81e7e80990
12 changed files with 31 additions and 86 deletions

View file

@ -414,10 +414,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
calculate_debuginfo_offset(bx, var.projection, base);
// Create a variable which will be a pointer to the actual value
let ptr_ty = Ty::new_ptr(
bx.tcx(),
ty::TypeAndMut { mutbl: mir::Mutability::Mut, ty: place.layout.ty },
);
let ptr_ty = Ty::new_mut_ptr(bx.tcx(), place.layout.ty);
let ptr_layout = bx.layout_of(ptr_ty);
let alloca = PlaceRef::alloca(bx, ptr_layout);
bx.set_var_name(alloca.llval, &(var.name.to_string() + ".dbg.spill"));