Currently we pass a `struct S(u64)` as an immediate value on i686, but a
`struct S { x: u64 }` is passed indirectly. This seems pretty wrong,
as they both have the same underlying LLVM type `{ i64 }`, no sense in
treating them differently.
match ty.sty {
ty::ty_struct(def_id, substs) => {
let fields = ty::struct_fields(ccx.tcx(), def_id, substs);
- fields.len() == 1 &&
- fields[0].name ==
- token::special_idents::unnamed_field.name &&
- type_is_immediate(ccx, fields[0].mt.ty)
+ fields.len() == 1 && type_is_immediate(ccx, fields[0].mt.ty)
}
_ => false
}