mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed valueless static locals
This commit is contained in:
parent
7458efc67f
commit
1a187de4c9
1 changed files with 2 additions and 1 deletions
|
@ -1883,7 +1883,8 @@ BfLocalVariable* BfModule::HandleVariableDeclaration(BfVariableDeclaration* varD
|
|||
if (!initValue)
|
||||
initValue = GetDefaultTypedValue(localDef->mResolvedType);
|
||||
|
||||
localDef->mAddr = mBfIRBuilder->CreateGlobalVariable(mBfIRBuilder->MapType(localDef->mResolvedType), false, BfIRLinkageType_Internal, initValue.mValue, name);;
|
||||
if (!localDef->mResolvedType->IsValuelessType())
|
||||
localDef->mAddr = mBfIRBuilder->CreateGlobalVariable(mBfIRBuilder->MapType(localDef->mResolvedType), false, BfIRLinkageType_Internal, initValue.mValue, name);;
|
||||
initHandled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue