mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
ignore empty struct loading
This commit is contained in:
parent
1fccd5bede
commit
5cb682140d
2 changed files with 9 additions and 2 deletions
|
@ -534,6 +534,9 @@ impl<
|
|||
ASM::mov_base32_reg64(&mut self.buf, offset + 8, CC::GENERAL_RETURN_REGS[1]);
|
||||
}
|
||||
}
|
||||
Layout::Struct([]) => {
|
||||
// Nothing needs to be done to load a returned empty struct.
|
||||
}
|
||||
x => unimplemented!(
|
||||
"FnCall: receiving return type, {:?}, is not yet implemented",
|
||||
x
|
||||
|
|
|
@ -277,7 +277,9 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64SystemV {
|
|||
// For most return layouts we will do nothing.
|
||||
// In some cases, we need to put the return address as the first arg.
|
||||
match ret_layout {
|
||||
Layout::Builtin(single_register_builtins!() | Builtin::Str) => {}
|
||||
Layout::Builtin(single_register_builtins!() | Builtin::Str) | Layout::Struct([]) => {
|
||||
// Nothing needs to be done for any of these cases.
|
||||
}
|
||||
x => {
|
||||
unimplemented!("receiving return type, {:?}, is not yet implemented", x);
|
||||
}
|
||||
|
@ -623,7 +625,9 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
// For most return layouts we will do nothing.
|
||||
// In some cases, we need to put the return address as the first arg.
|
||||
match ret_layout {
|
||||
Layout::Builtin(single_register_builtins!()) => {}
|
||||
Layout::Builtin(single_register_builtins!()) | Layout::Struct([]) => {
|
||||
// Nothing needs to be done for any of these cases.
|
||||
}
|
||||
x => {
|
||||
unimplemented!("receiving return type, {:?}, is not yet implemented", x);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue