mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed global var TLS issue
This commit is contained in:
parent
1c14177638
commit
85c9a6ebc8
1 changed files with 2 additions and 4 deletions
|
@ -4734,10 +4734,8 @@ void BfIRBuilder::CreateGlobalVariable(BfIRValue irValue)
|
|||
{
|
||||
auto globalVar = (BfGlobalVar*)GetConstant(irValue);
|
||||
|
||||
if (!mIgnoreWrites)
|
||||
if ((!mIgnoreWrites) && (globalVar->mStreamId == -1))
|
||||
{
|
||||
BF_ASSERT(globalVar->mStreamId == -1);
|
||||
|
||||
if (globalVar->mInitializer)
|
||||
mHasGlobalDefs = true;
|
||||
|
||||
|
@ -4776,7 +4774,7 @@ BfIRValue BfIRConstHolder::CreateGlobalVariableConstant(BfIRType varType, bool i
|
|||
|
||||
BfIRValue BfIRBuilder::CreateGlobalVariable(BfIRType varType, bool isConstant, BfIRLinkageType linkageType, BfIRValue initializer, const StringImpl& name, bool isTLS)
|
||||
{
|
||||
auto irValue = CreateGlobalVariableConstant(varType, isConstant, linkageType, initializer, name);
|
||||
auto irValue = CreateGlobalVariableConstant(varType, isConstant, linkageType, initializer, name, isTLS);
|
||||
CreateGlobalVariable(irValue);
|
||||
return irValue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue