Store fat pointers in ssa variables

This commit is contained in:
Santiago Pastorino 2020-07-03 09:48:19 -03:00
parent 9ec2be7d63
commit ef01b4e3dd
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -76,6 +76,13 @@ fn clif_pair_type_from_ty<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<(type
clif_type_from_ty(tcx, types.next().unwrap())?,
)
}
ty::RawPtr(TypeAndMut { ty: pointee_ty, mutbl: _ }) | ty::Ref(_, pointee_ty, _) => {
if has_ptr_meta(tcx, pointee_ty) {
(pointer_ty(tcx), pointer_ty(tcx))
} else {
return None
}
}
_ => return None,
})
}