ignore unsized types in mips64 and sparc64 callconvs
This commit is contained in:
parent
0df64c5784
commit
bbf7dc0ddf
3 changed files with 8 additions and 4 deletions
|
|
@ -148,12 +148,12 @@ where
|
|||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
{
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
if !fn_abi.ret.is_ignore() && fn_abi.ret.layout.is_sized() {
|
||||
classify_ret(cx, &mut fn_abi.ret);
|
||||
}
|
||||
|
||||
for arg in fn_abi.args.iter_mut() {
|
||||
if arg.is_ignore() {
|
||||
if arg.is_ignore() || !arg.layout.is_sized() {
|
||||
continue;
|
||||
}
|
||||
classify_arg(cx, arg);
|
||||
|
|
|
|||
|
|
@ -216,11 +216,14 @@ where
|
|||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
{
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
if !fn_abi.ret.is_ignore() && fn_abi.ret.layout.is_sized() {
|
||||
classify_arg(cx, &mut fn_abi.ret, Size::from_bytes(32));
|
||||
}
|
||||
|
||||
for arg in fn_abi.args.iter_mut() {
|
||||
if !arg.layout.is_sized() {
|
||||
continue;
|
||||
}
|
||||
if arg.is_ignore() {
|
||||
// sparc64-unknown-linux-{gnu,musl,uclibc} doesn't ignore ZSTs.
|
||||
if cx.target_spec().os == Os::Linux
|
||||
|
|
|
|||
|
|
@ -280,7 +280,8 @@ macro_rules! test_transparent_unsized {
|
|||
};
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_arch = "mips64", target_arch = "sparc64")))]
|
||||
// NOTE: non-rustic ABIs do not support unsized types: they are skipped during ABI generation, and
|
||||
// will trigger an error if they make it to rustc_monomorphize/src/mono_checks/abi_check.rs
|
||||
mod unsized_ {
|
||||
use super::*;
|
||||
test_transparent_unsized!(str_, str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue