Skip to content

Commit ef5ec77

Browse files
abi: add AddressSpace field to Primitive::Pointer
...and remove it from `PointeeInfo`, which isn't meant for this. There are still various places (marked with FIXMEs) that assume all pointers have the same size and alignment. Fixing this requires parsing non-default address spaces in the data layout string, which will be done in a followup.
1 parent 739938d commit ef5ec77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ pub(crate) fn scalar_to_clif_type(tcx: TyCtxt<'_>, scalar: Scalar) -> Type {
3535
},
3636
Primitive::F32 => types::F32,
3737
Primitive::F64 => types::F64,
38-
Primitive::Pointer => pointer_ty(tcx),
38+
// FIXME(erikdesjardins): handle non-default addrspace ptr sizes
39+
Primitive::Pointer(_) => pointer_ty(tcx),
3940
}
4041
}
4142

0 commit comments

Comments
 (0)