MCPcopy Create free account
hub / github.com/beefytech/Beef / IsThreadLocal

Method IsThreadLocal

IDEHelper/Compiler/BfModule.cpp:4646–4664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4644}
4645
4646bool BfModule::IsThreadLocal(BfFieldInstance * fieldInstance)
4647{
4648 if (fieldInstance->mCustomAttributes == NULL)
4649 return false;
4650 auto fieldDef = fieldInstance->GetFieldDef();
4651 if (!fieldDef->mIsStatic)
4652 return false;
4653
4654 bool isThreadLocal = false;
4655 if (fieldInstance->mCustomAttributes != NULL)
4656 {
4657 for (auto customAttr : fieldInstance->mCustomAttributes->mAttributes)
4658 {
4659 if (customAttr.mType->ToTypeInstance()->IsInstanceOf(mCompiler->mThreadStaticAttributeTypeDef))
4660 return true;
4661 }
4662 }
4663 return false;
4664}
4665
4666BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance, BfExpression* initializer, BfFieldDef* fieldDef, BfType* fieldType, bool doStore)
4667{

Callers 1

CreateTypeDefinitionMethod · 0.80

Calls 3

GetFieldDefMethod · 0.80
IsInstanceOfMethod · 0.45
ToTypeInstanceMethod · 0.45

Tested by

no test coverage detected