1
Fork 0

Replace ByVal attribute with on_stack field for Indirect

This makes it clearer that only PassMode::Indirect allows ByVal
This commit is contained in:
bjorn3 2020-11-14 14:29:40 +01:00
parent 967a228208
commit 42b0b8080d
5 changed files with 102 additions and 57 deletions

View file

@ -2801,7 +2801,8 @@ where
for arg in &mut self.args {
fixup(arg, false);
}
if let PassMode::Indirect(ref mut attrs, _) = self.ret.mode {
if let PassMode::Indirect { ref mut attrs, extra_attrs: _, on_stack: _ } = self.ret.mode
{
attrs.set(ArgAttribute::StructRet);
}
return;