| 4644 | } |
| 4645 | |
| 4646 | bool 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 | |
| 4666 | BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance, BfExpression* initializer, BfFieldDef* fieldDef, BfType* fieldType, bool doStore) |
| 4667 | { |
no test coverage detected