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

Improved mGhostDependencies handling of undefined types

This commit is contained in:
Brian Fiete 2025-02-18 11:39:56 -08:00
parent 6dc9aeb104
commit 6c47990368

View file

@ -1354,6 +1354,17 @@ void BfModule::PopulateType(BfType* resolvedTypeRef, BfPopulateType populateType
if (mContext->mGhostDependencies.Contains(resolvedTypeRef))
{
// Not a nice state, but we should be able to recover
if (resolvedTypeRef->mDefineState < BfTypeDefineState_Defined)
{
resolvedTypeRef->mDefineState = BfTypeDefineState_Defined;
resolvedTypeRef->mSize = 0;
resolvedTypeRef->mAlign = 1;
if (typeInstance != NULL)
{
typeInstance->mInstSize = 0;
typeInstance->mInstAlign = 1;
}
}
return;
}