| 11101 | } |
| 11102 | |
| 11103 | void BfModule::GetDelegateTypeRefAttributes(BfDelegateTypeRef* delegateTypeRef, BfCallingConvention& callingConvention) |
| 11104 | { |
| 11105 | if (delegateTypeRef->mAttributes == NULL) |
| 11106 | return; |
| 11107 | |
| 11108 | BfCaptureInfo captureInfo; |
| 11109 | auto customAttributes = GetCustomAttributes(delegateTypeRef->mAttributes, (BfAttributeTargets)(BfAttributeTargets_DelegateTypeRef | BfAttributeTargets_FunctionTypeRef), BfGetCustomAttributesFlags_KeepConstsInModule); |
| 11110 | if (customAttributes != NULL) |
| 11111 | { |
| 11112 | auto linkNameAttr = customAttributes->Get(mCompiler->mCallingConventionAttributeTypeDef); |
| 11113 | if (linkNameAttr != NULL) |
| 11114 | { |
| 11115 | if (linkNameAttr->mCtorArgs.size() == 1) |
| 11116 | { |
| 11117 | auto constant = mBfIRBuilder->GetConstant(linkNameAttr->mCtorArgs[0]); |
| 11118 | if (constant != NULL) |
| 11119 | callingConvention = (BfCallingConvention)constant->mInt32; |
| 11120 | } |
| 11121 | } |
| 11122 | delete customAttributes; |
| 11123 | } |
| 11124 | } |
| 11125 | |
| 11126 | BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType populateType, BfResolveTypeRefFlags resolveFlags, int numGenericArgs) |
| 11127 | { |
no test coverage detected