1
Fork 0

Refactor float Primitives to a separate Float type

This commit is contained in:
beetrees 2024-05-06 13:27:40 +01:00
parent 8cef37dbb6
commit 3769fddba2
No known key found for this signature in database
GPG key ID: 8791BD754191EBD6
23 changed files with 156 additions and 96 deletions

View file

@ -122,10 +122,7 @@ fn tag_base_type<'ll, 'tcx>(
// Niche tags are always normalized to unsized integers of the correct size.
match tag.primitive() {
Primitive::Int(t, _) => t,
Primitive::F16 => Integer::I16,
Primitive::F32 => Integer::I32,
Primitive::F64 => Integer::I64,
Primitive::F128 => Integer::I128,
Primitive::Float(f) => Integer::from_size(f.size()).unwrap(),
// FIXME(erikdesjardins): handle non-default addrspace ptr sizes
Primitive::Pointer(_) => {
// If the niche is the NULL value of a reference, then `discr_enum_ty` will be