diff --git a/src/builder.rs b/src/builder.rs index 15ebcf42b3f7..97a1a175f201 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -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())