llvm: fix c abi for structs not passed in registers

Closes #18916
This commit is contained in:
Jacob Young
2024-02-20 13:41:24 +01:00
parent 2291560424
commit ec7293422d
3 changed files with 255 additions and 97 deletions

View File

@@ -11443,6 +11443,12 @@ const ParamTypeIterator = struct {
it.llvm_index += 1;
return .abi_sized_int;
}
if (it.llvm_index + types_index > 6) {
it.zig_index += 1;
it.llvm_index += 1;
it.byval_attr = true;
return .byref;
}
switch (ip.indexToKey(ty.toIntern())) {
.struct_type => |struct_type| {
assert(struct_type.haveLayout(ip));