1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Array creation const check

This commit is contained in:
Brian Fiete 2024-02-24 08:54:32 -05:00
parent c1003cd3e0
commit fa019f03bf

View file

@ -20963,7 +20963,8 @@ void BfExprEvaluator::InitializedSizedArray(BfSizedArrayType* arrayType, BfToken
}
elementValue = mModule->LoadOrAggregateValue(elementValue);
mModule->mBfIRBuilder->CreateAlignedStore(elementValue.mValue, elemPtrValue, checkArrayType->mElementType->mAlign);
if (!elementValue.mValue.IsConst())
mModule->mBfIRBuilder->CreateAlignedStore(elementValue.mValue, elemPtrValue, checkArrayType->mElementType->mAlign);
}
}