Skip to content

Commit 268e9d7

Browse files
committed
Non-MS CLink static field fix
1 parent 9b18db0 commit 268e9d7

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

IDEHelper/Compiler/BfMangler.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,15 +2295,6 @@ void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfMethodInstance* metho
22952295
void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfFieldInstance* fieldInstance)
22962296
{
22972297
auto fieldDef = fieldInstance->GetFieldDef();
2298-
if (fieldDef->mFieldDeclaration != NULL)
2299-
{
2300-
auto module = fieldInstance->mOwner->mModule;
2301-
if ((fieldInstance->mCustomAttributes != NULL) && (fieldInstance->mCustomAttributes->Contains(module->mCompiler->mCLinkAttributeTypeDef)))
2302-
{
2303-
name += fieldDef->mName;
2304-
return;
2305-
}
2306-
}
23072298

23082299
BF_ASSERT(fieldDef->mIsStatic);
23092300
MangleContext mangleContext;
@@ -2442,6 +2433,11 @@ void BfMangler::HandleCustomAttributes(BfCustomAttributes* customAttributes, BfI
24422433
}
24432434
}
24442435
}
2436+
2437+
if (customAttributes->Contains(module->mCompiler->mCLinkAttributeTypeDef))
2438+
{
2439+
isCMangle = true;
2440+
}
24452441
}
24462442

24472443
void BfMangler::HandleParamCustomAttributes(BfAttributeDirective* attributes, bool isReturn, bool& isConst)

0 commit comments

Comments
 (0)