Fix inttoptr
This commit is contained in:
parent
a7c1c47c83
commit
3e35fab71e
1 changed files with 2 additions and 6 deletions
|
@ -906,12 +906,8 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn inttoptr(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
|
fn inttoptr(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
|
||||||
assert_eq!(
|
let usize_value = self.intcast(value, self.cx.type_isize(), false);
|
||||||
value.get_type(),
|
self.cx.const_bitcast(usize_value, dest_ty)
|
||||||
self.cx.type_isize(),
|
|
||||||
"cg_ssa currently only calls this function with an isize argument",
|
|
||||||
);
|
|
||||||
self.cx.const_bitcast(value, dest_ty)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn bitcast(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
|
fn bitcast(&mut self, value: RValue<'gcc>, dest_ty: Type<'gcc>) -> RValue<'gcc> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue