1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Allow => funcPtr function binding

This commit is contained in:
Brian Fiete 2020-10-19 15:32:13 -07:00
parent d46c60d956
commit eaeb5ab6f8
6 changed files with 62 additions and 19 deletions

View file

@ -2239,8 +2239,15 @@ void BfIRBuilder::CreateTypeDeclaration(BfType* type, bool forceDbgDefine)
name += BfTypeUtils::HashEncode64(methodInstance->mIdHash).c_str();
if (wantDIData)
{
auto bfFileInstance = mModule->GetFileFromNode(methodInstance->GetOwner()->mTypeDef->mTypeDeclaration);
{
auto typeDeclaration = methodInstance->GetOwner()->mTypeDef->mTypeDeclaration;
BfFileInstance* bfFileInstance;
if (typeDeclaration != NULL)
bfFileInstance = mModule->GetFileFromNode(typeDeclaration);
else
bfFileInstance = mModule->GetFileFromNode(mModule->mContext->mBfObjectType->mTypeDef->mTypeDeclaration);
auto namespaceScope = DbgCreateNameSpace(bfFileInstance->mDIFile, "_bf", bfFileInstance->mDIFile, 0);
StringT<128> mangledName;