| 791 | } |
| 792 | |
| 793 | BfImportKind BfMethodInstance::GetImportKind() |
| 794 | { |
| 795 | if (mMethodDef->mImportKind != BfImportKind_Import_Unknown) |
| 796 | return mMethodDef->mImportKind; |
| 797 | |
| 798 | auto module = GetOwner()->mModule; |
| 799 | auto customAttributes = GetCustomAttributes(); |
| 800 | if (customAttributes == NULL) |
| 801 | return BfImportKind_None; |
| 802 | |
| 803 | BfCustomAttribute* customAttribute = customAttributes->Get(module->mCompiler->mImportAttributeTypeDef); |
| 804 | if (customAttribute == NULL) |
| 805 | return BfImportKind_Import_Static; |
| 806 | |
| 807 | BfIRConstHolder* constHolder = GetOwner()->mConstHolder; |
| 808 | String* filePath = module->GetStringPoolString(customAttribute->mCtorArgs[0], constHolder); |
| 809 | if (filePath == NULL) |
| 810 | return BfImportKind_Import_Static; |
| 811 | return BfMethodDef::GetImportKindFromPath(*filePath); |
| 812 | } |
| 813 | |
| 814 | BfMethodFlags BfMethodInstance::GetMethodFlags() |
| 815 | { |
no test coverage detected