mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Sized-array calling convention fix
This commit is contained in:
parent
80fcf84de2
commit
8a63a7ed80
5 changed files with 17 additions and 5 deletions
|
@ -15676,10 +15676,11 @@ void BfModule::SetupIRMethod(BfMethodInstance* methodInstance, BfIRFunction func
|
|||
PopulateType(resolvedTypeRef, BfPopulateType_Data);
|
||||
addDeref = resolvedTypeRef->mSize;
|
||||
}
|
||||
else if (methodInstance->WantsStructsAttribByVal())
|
||||
else if ((methodInstance->WantsStructsAttribByVal()) && (!resolvedTypeRef->IsSizedArray()))
|
||||
{
|
||||
mBfIRBuilder->PopulateType(resolvedTypeRef);
|
||||
mBfIRBuilder->Func_AddAttribute(func, argIdx + 1, BfIRAttribute_ByVal, mSystem->mPtrSize);
|
||||
BF_ASSERT(resolvedTypeRef->mAlign > 0);
|
||||
mBfIRBuilder->Func_AddAttribute(func, argIdx + 1, BfIRAttribute_ByVal, resolvedTypeRef->mAlign);
|
||||
}
|
||||
}
|
||||
else if (resolvedTypeRef->IsPrimitiveType())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue