mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 06:43:14 +01:00
Improve ABI conformance on x86 by passing the sret parameter in EAX if there's
no `this`.
This commit is contained in:
@@ -322,7 +322,8 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
|
||||
// add attrs for hidden ptr
|
||||
Attr.Index = 1;
|
||||
Attr.Attrs = tf->fty.arg_sret->attrs;
|
||||
assert((Attr.Attrs & llvm::Attribute::StructRet) && "Sret arg not sret?");
|
||||
assert((Attr.Attrs & (llvm::Attribute::StructRet | llvm::Attribute::InReg))
|
||||
&& "Sret arg not sret or inreg?");
|
||||
attrs.push_back(Attr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user