From 43e718b24ec4f24648140d9c6048ac6670de4327 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 2 Mar 2024 06:04:44 -0500 Subject: [PATCH] IsThreadLocal fixes --- IDEHelper/Compiler/BfIRBuilder.cpp | 4 ++-- IDEHelper/Compiler/BfModule.cpp | 4 ++-- IDEHelper/Compiler/BfResolvedTypeUtils.h | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/IDEHelper/Compiler/BfIRBuilder.cpp b/IDEHelper/Compiler/BfIRBuilder.cpp index 92812cfc..080c7d81 100644 --- a/IDEHelper/Compiler/BfIRBuilder.cpp +++ b/IDEHelper/Compiler/BfIRBuilder.cpp @@ -3967,9 +3967,9 @@ void BfIRBuilder::CreateTypeDefinition(BfType* type, bool forceDbgDefine) { if (isDefiningModule) { - fieldInstance->mIsThreadLocal = mModule->IsThreadLocal(fieldInstance); + bool isThreadLocal = mModule->IsThreadLocal(fieldInstance); if (!resolvedFieldType->IsVoid()) - mModule->CreateStaticField(fieldInstance, fieldInstance->mIsThreadLocal); + mModule->CreateStaticField(fieldInstance, isThreadLocal); } } } diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 757fbbf2..9a13232e 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -19959,7 +19959,7 @@ void BfModule::EmitGCMarkMembers() auto fieldDef = fieldInst.GetFieldDef(); if (fieldDef == NULL) continue; - if (fieldInst.mIsThreadLocal) + if (IsThreadLocal(&fieldInst)) continue; if (fieldDef->mIsStatic == methodDef->mIsStatic) @@ -20038,7 +20038,7 @@ void BfModule::EmitGCFindTLSMembers() auto fieldDef = fieldInst.GetFieldDef(); if (fieldDef == NULL) continue; - if (!fieldInst.mIsThreadLocal) + if (!IsThreadLocal(&fieldInst)) continue; // For extensions, only handle these fields in the appropriate extension diff --git a/IDEHelper/Compiler/BfResolvedTypeUtils.h b/IDEHelper/Compiler/BfResolvedTypeUtils.h index 556d43a1..523bcea8 100644 --- a/IDEHelper/Compiler/BfResolvedTypeUtils.h +++ b/IDEHelper/Compiler/BfResolvedTypeUtils.h @@ -1393,7 +1393,6 @@ public: int mDataSize; bool mFieldIncluded; bool mIsEnumPayloadCase; - bool mIsThreadLocal; bool mIsInferredType; bool mHadConstEval; int mLastRevisionReferenced; @@ -1418,7 +1417,6 @@ public: mDataSize = copyFrom.mDataSize; mFieldIncluded = copyFrom.mFieldIncluded; mIsEnumPayloadCase = copyFrom.mIsEnumPayloadCase; - mIsThreadLocal = copyFrom.mIsThreadLocal; mIsInferredType = copyFrom.mIsInferredType; mHadConstEval = copyFrom.mHadConstEval; mLastRevisionReferenced = copyFrom.mLastRevisionReferenced; @@ -1440,7 +1438,6 @@ public: mDataSize = copyFrom.mDataSize; mFieldIncluded = copyFrom.mFieldIncluded; mIsEnumPayloadCase = copyFrom.mIsEnumPayloadCase; - mIsThreadLocal = copyFrom.mIsThreadLocal; mIsInferredType = copyFrom.mIsInferredType; mHadConstEval = copyFrom.mHadConstEval; mLastRevisionReferenced = copyFrom.mLastRevisionReferenced; @@ -1459,7 +1456,6 @@ public: mDataOffset = -1; mDataSize = 0; mFieldIncluded = true; - mIsThreadLocal = false; mIsInferredType = false; mHadConstEval = false; mLastRevisionReferenced = -1;