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

Method GetImportKind

IDEHelper/Compiler/BfResolvedTypeUtils.cpp:793–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791}
792
793BfImportKind 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
814BfMethodFlags BfMethodInstance::GetMethodFlags()
815{

Callers 1

ProcessMethodMethod · 0.80

Calls 2

GetStringPoolStringMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected