mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 21:34:11 +02:00
Fixed uninitialized static local
This commit is contained in:
parent
1d2811f50d
commit
0d5b209a14
1 changed files with 3 additions and 0 deletions
|
@ -1823,6 +1823,9 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
||||||
initValue = BfTypedValue();
|
initValue = BfTypedValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!initValue)
|
||||||
|
initValue = GetDefaultTypedValue(localDef->mResolvedType);
|
||||||
|
|
||||||
localDef->mAddr = mBfIRBuilder->CreateGlobalVariable(mBfIRBuilder->MapType(localDef->mResolvedType), false, BfIRLinkageType_Internal, initValue.mValue, name);;
|
localDef->mAddr = mBfIRBuilder->CreateGlobalVariable(mBfIRBuilder->MapType(localDef->mResolvedType), false, BfIRLinkageType_Internal, initValue.mValue, name);;
|
||||||
initHandled = true;
|
initHandled = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue