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

Method GetDelegateTypeRefAttributes

IDEHelper/Compiler/BfModuleTypeUtils.cpp:11103–11124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11101}
11102
11103void 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
11126BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType populateType, BfResolveTypeRefFlags resolveFlags, int numGenericArgs)
11127{

Callers 1

EqualsMethod · 0.80

Calls 3

GetMethod · 0.45
sizeMethod · 0.45
GetConstantMethod · 0.45

Tested by

no test coverage detected