mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +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)
|
if (!initValue)
|
||||||
initValue = GetDefaultTypedValue(localDef->mResolvedType);
|
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;
|
initHandled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue