Skip to content

Commit c9f4e65

Browse files
Fix casts
1 parent cbf599a commit c9f4e65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
153153

154154
// NOTE: not sure why, but we have the wrong type here.
155155
let int_type = compare_exchange.get_param(2).to_rvalue().get_type();
156-
let src = self.context.new_cast(self.location, src, int_type);
156+
let src = self.context.new_bitcast(self.location, src, int_type);
157157
self.context.new_call(
158158
self.location,
159159
compare_exchange,
@@ -1631,7 +1631,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
16311631
let dst = self.context.new_cast(self.location, dst, volatile_void_ptr_type);
16321632
// FIXME(antoyo): not sure why, but we have the wrong type here.
16331633
let new_src_type = atomic_function.get_param(1).to_rvalue().get_type();
1634-
let src = self.context.new_cast(self.location, src, new_src_type);
1634+
let src = self.context.new_bitcast(self.location, src, new_src_type);
16351635
let res = self.context.new_call(self.location, atomic_function, &[dst, src, order]);
16361636
self.context.new_cast(self.location, res, src.get_type())
16371637
}

0 commit comments

Comments
 (0)