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

Fixed uninitialized static local

This commit is contained in:
Brian Fiete 2022-06-27 11:08:03 -07:00
parent 1d2811f50d
commit 0d5b209a14

View file

@ -1823,6 +1823,9 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
initValue = BfTypedValue();
}
if (!initValue)
initValue = GetDefaultTypedValue(localDef->mResolvedType);
localDef->mAddr = mBfIRBuilder->CreateGlobalVariable(mBfIRBuilder->MapType(localDef->mResolvedType), false, BfIRLinkageType_Internal, initValue.mValue, name);;
initHandled = true;
}