1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

BfConstType_Agg fix for padded FixValues

This commit is contained in:
Brian Fiete 2024-10-14 12:32:48 -04:00
parent 4cee66b1f8
commit 7c0293620a
2 changed files with 44 additions and 3 deletions

View file

@ -886,6 +886,10 @@ void BeIRCodeGen::Read(BeValue*& beValue)
auto constStruct = mBeModule->mOwnedValues.Alloc<BeStructConstant>();
constStruct->mType = type;
if (type->IsStruct())
FixValues((BeStructType*)type, values);
for (int i = 0; i < (int)values.size(); i++)
{
auto val = values[i];
@ -934,9 +938,6 @@ void BeIRCodeGen::Read(BeValue*& beValue)
constStruct->mMemberValues.Add(constant);
}
if (type->IsStruct())
FixValues((BeStructType*)type, constStruct->mMemberValues);
beValue = constStruct;
BE_MEM_END("ParamType_Const_Array");