| 2415 | } |
| 2416 | |
| 2417 | void BfMangler::HandleCustomAttributes(BfCustomAttributes* customAttributes, BfIRConstHolder* constHolder, BfModule* module, StringImpl& name, bool& isCMangle, bool& isCPPMangle) |
| 2418 | { |
| 2419 | if (customAttributes == NULL) |
| 2420 | return; |
| 2421 | |
| 2422 | auto linkNameAttr = customAttributes->Get(module->mCompiler->mLinkNameAttributeTypeDef); |
| 2423 | if (linkNameAttr != NULL) |
| 2424 | { |
| 2425 | if (linkNameAttr->mCtorArgs.size() == 1) |
| 2426 | { |
| 2427 | if (module->TryGetConstString(constHolder, linkNameAttr->mCtorArgs[0], name)) |
| 2428 | if (!name.IsWhitespace()) |
| 2429 | return; |
| 2430 | |
| 2431 | auto constant = constHolder->GetConstant(linkNameAttr->mCtorArgs[0]); |
| 2432 | if (constant != NULL) |
| 2433 | { |
| 2434 | if (constant->mInt32 == 1) // C |
| 2435 | { |
| 2436 | isCMangle = true; |
| 2437 | } |
| 2438 | else if (constant->mInt32 == 2) // CPP |
| 2439 | { |
| 2440 | isCPPMangle = true; |
| 2441 | } |
| 2442 | } |
| 2443 | } |
| 2444 | } |
| 2445 | } |
| 2446 | |
| 2447 | void BfMangler::HandleParamCustomAttributes(BfAttributeDirective* attributes, bool isReturn, bool& isConst) |
| 2448 | { |
nothing calls this directly
no test coverage detected