Add missing location info

This commit is contained in:
Antoni Boucher 2024-11-18 18:55:57 -05:00
parent c2e6d38b8a
commit b9cb8ebca6

View file

@ -1120,9 +1120,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
}
let modified_ptr =
self.cx.context.new_cast(None, ptr, modified_destination_type.make_pointer());
let modified_destination = modified_ptr.dereference(None);
self.llbb().add_assignment(None, modified_destination, val);
self.cx.context.new_cast(self.location, ptr, modified_destination_type.make_pointer());
let modified_destination = modified_ptr.dereference(self.location);
self.llbb().add_assignment(self.location, modified_destination, val);
// TODO(antoyo): handle `MemFlags::NONTEMPORAL`.
// NOTE: dummy value here since it's never used. FIXME(antoyo): API should not return a value here?
self.cx.context.new_rvalue_zero(self.type_i32())