1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Comptime mangle collision fix

This commit is contained in:
Brian Fiete 2021-01-13 08:51:52 -08:00
parent 9510faafca
commit 51ed3df320

View file

@ -883,6 +883,9 @@ String BfGNUMangler::Mangle(BfMethodInstance* methodInst)
else if (methodDef->mCheckedKind == BfCheckedKind_Unchecked)
name += "`UCHK";
if (methodDef->mHasComptime)
name += "`COMPTIME";
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (methodInst->mMethodDef->mDeclaringType->IsExtension()) &&
(!methodInst->mIsForeignMethodDef) && (!methodInst->mMethodDef->mIsExtern) &&
((!methodInst->mMethodDef->mIsOverride) || (methodDef->mName == BF_METHODNAME_MARKMEMBERS) || (methodDef->mMethodType == BfMethodType_Dtor)))
@ -2064,7 +2067,10 @@ void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfMethodInstance* metho
if (methodDef->mCheckedKind == BfCheckedKind_Checked)
name += "CHK$";
else if (methodDef->mCheckedKind == BfCheckedKind_Unchecked)
name += "UCHK$";
name += "UCHK$";
if (methodDef->mHasComptime)
name += "COMPTIME$";
}
/*if ((methodInst->mMethodInstanceGroup->mOwner->mTypeDef->IsGlobalsContainer()) && (methodInst->mMethodDef->mMethodDeclaration == NULL))