Skip to content

Commit

Permalink
Add missing location info
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Nov 18, 2024
1 parent c2e6d38 commit b9cb8eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit b9cb8eb

Please sign in to comment.