Lines Matching +full:jc +full:- +full:42
1 //===--- MicrosoftMangle.cpp - Microsoft Visual C++ Name Mangling ---------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
91 if (RD->isLambda()) in getLambdaDefaultArgumentDeclContext()
93 dyn_cast_or_null<ParmVarDecl>(RD->getLambdaContextDecl())) in getLambdaDefaultArgumentDeclContext()
94 return Parm->getDeclContext(); in getLambdaDefaultArgumentDeclContext()
113 dyn_cast_or_null<ParmVarDecl>(BD->getBlockManglingContextDecl())) in getEffectiveDeclContext()
114 return ContextParam->getDeclContext(); in getEffectiveDeclContext()
117 const DeclContext *DC = D->getDeclContext(); in getEffectiveDeclContext()
123 return DC->getRedeclContext(); in getEffectiveDeclContext()
132 return FTD->getTemplatedDecl()->getCanonicalDecl(); in getStructor()
135 if (const auto *FTD = FD->getPrimaryTemplate()) in getStructor()
136 return FTD->getTemplatedDecl()->getCanonicalDecl(); in getStructor()
138 return FD->getCanonicalDecl(); in getStructor()
141 /// MicrosoftMangleContextImpl - Overrides the default MangleContext for the
218 if (!DC->isFunctionOrMethod()) in getNextDiscriminator()
224 if (RD->isLambda()) { in getNextDiscriminator()
231 if (ND->isExternallyVisible()) { in getNextDiscriminator()
238 if (!Tag->hasNameForLinkage() && in getNextDiscriminator()
247 discriminator = ++Discriminator[std::make_pair(DC, ND->getIdentifier())]; in getNextDiscriminator()
253 assert(Lambda->isLambda() && "RD must be a lambda!"); in getLambdaString()
256 Decl *LambdaContextDecl = Lambda->getLambdaContextDecl(); in getLambdaString()
257 unsigned LambdaManglingNumber = Lambda->getLambdaManglingNumber(); in getLambdaString()
261 Parm ? dyn_cast<FunctionDecl>(Parm->getDeclContext()) : nullptr; in getLambdaString()
265 Func->getNumParams() - Parm->getFunctionScopeIndex(); in getLambdaString()
281 assert(RD->isLambda() && "RD must be a lambda!"); in getLambdaId()
282 assert(!RD->isExternallyVisible() && "RD must not be visible!"); in getLambdaId()
283 assert(RD->getLambdaManglingNumber() == 0 && in getLambdaId()
287 return Result.first->second; in getLambdaId()
291 assert(RD->isLambda() && "RD must be a lambda!"); in getLambdaIdForDebugInfo()
292 assert(!RD->isExternallyVisible() && "RD must not be visible!"); in getLambdaIdForDebugInfo()
293 assert(RD->getLambdaManglingNumber() == 0 && in getLambdaIdForDebugInfo()
309 /// MicrosoftCXXNameMangler - Manage the mangling of a single name for the
315 /// The "structor" is the top-level declaration being mangled, if
345 : Context(C), Out(Out_), Structor(nullptr), StructorType(-1), in MicrosoftCXXNameMangler()
420 mangleUnqualifiedName(GD, cast<NamedDecl>(GD.getDecl())->getDeclName()); in mangleUnqualifiedName()
500 uint32_t TruncatedHash = uint32_t(xxh3_64bits(FE->getName())); in MicrosoftMangleContextImpl()
510 LanguageLinkage L = FD->getLanguageLinkage(); in shouldMangleCXXName()
512 if (FD->hasAttr<OverloadableAttr>()) in shouldMangleCXXName()
515 // The ABI expects that we would never mangle "typical" user-defined entry in shouldMangleCXXName()
516 // points regardless of visibility or freestanding-ness. in shouldMangleCXXName()
520 // user-defined entry points are outside of the purview of the standard. in shouldMangleCXXName()
524 if (FD->isMSVCRTEntryPoint()) in shouldMangleCXXName()
529 if (!FD->getDeclName().isIdentifier() || L == CXXLanguageLinkage) in shouldMangleCXXName()
544 if (VD->isExternC()) in shouldMangleCXXName()
550 if (DC->isFunctionOrMethod() && D->hasLinkage()) in shouldMangleCXXName()
551 while (!DC->isNamespace() && !DC->isTranslationUnit()) in shouldMangleCXXName()
554 if (DC->isTranslationUnit() && D->getFormalLinkage() == Linkage::Internal && in shouldMangleCXXName()
555 !isa<VarTemplateSpecializationDecl>(D) && D->getIdentifier() != nullptr) in shouldMangleCXXName()
575 // <mangled-name> ::= ? <name> <type-encoding> in mangle()
587 // Template parameter objects don't get a <type-encoding>; their type is in mangle()
596 // <type-encoding> ::= <function-class> <function-type> in mangleFunctionEncoding()
601 FD = FD->getFirstDecl(); in mangleFunctionEncoding()
605 const FunctionProtoType *FT = FD->getType()->castAs<FunctionProtoType>(); in mangleFunctionEncoding()
615 if (FD->isExternC() && FD->hasAttr<OverloadableAttr>()) in mangleFunctionEncoding()
627 // <type-encoding> ::= <storage-class> <variable-type> in mangleVariableEncoding()
628 // <storage-class> ::= 0 # private static member in mangleVariableEncoding()
635 if (VD->isStaticDataMember()) { in mangleVariableEncoding()
637 switch (VD->getAccess()) { in mangleVariableEncoding()
644 else if (!VD->isStaticLocal()) in mangleVariableEncoding()
649 // <variable-type> ::= <type> <cvr-qualifiers> in mangleVariableEncoding()
650 // ::= <type> <pointee-cvr-qualifiers> # pointers, references in mangleVariableEncoding()
653 SourceRange SR = VD->getSourceRange(); in mangleVariableEncoding()
654 QualType Ty = VD->getType(); in mangleVariableEncoding()
655 if (Ty->isPointerType() || Ty->isReferenceType() || in mangleVariableEncoding()
656 Ty->isMemberPointerType()) { in mangleVariableEncoding()
660 if (const MemberPointerType *MPT = Ty->getAs<MemberPointerType>()) { in mangleVariableEncoding()
661 mangleQualifiers(MPT->getPointeeType().getQualifiers(), true); in mangleVariableEncoding()
664 mangleName(MPT->getClass()->getAsCXXRecordDecl()); in mangleVariableEncoding()
666 mangleQualifiers(Ty->getPointeeType().getQualifiers(), false); in mangleVariableEncoding()
670 if (AT->getElementType()->isArrayType()) in mangleVariableEncoding()
684 // <member-data-pointer> ::= <integer-literal> in mangleMemberDataPointer()
688 // <auto-nttp> ::= $ M <type> <integer-literal> in mangleMemberDataPointer()
689 // <auto-nttp> ::= $ M <type> F <name> <number> in mangleMemberDataPointer()
690 // <auto-nttp> ::= $ M <type> G <name> <number> <number> in mangleMemberDataPointer()
694 MSInheritanceModel IM = RD->getMSInheritanceModel(); in mangleMemberDataPointer()
704 FieldOffset -= getASTContext().getOffsetOfBaseWithVBPtr(RD).getQuantity(); in mangleMemberDataPointer()
706 FieldOffset = RD->nullFieldOffsetIsZero() ? 0 : -1; in mangleMemberDataPointer()
708 VBTableOffset = -1; in mangleMemberDataPointer()
724 PD && PD->getType()->getTypeClass() == Type::Auto && in mangleMemberDataPointer()
734 // The C++ standard doesn't allow base-to-derived member pointer conversions in mangleMemberDataPointer()
745 MSInheritanceModel IM = RD->getMSInheritanceModel(); in mangleMemberDataPointerInClassNTTP()
746 // <nttp-class-member-data-pointer> ::= <member-data-pointer> in mangleMemberDataPointerInClassNTTP()
748 // ::= 8 <postfix> @ <unqualified-name> @ in mangleMemberDataPointerInClassNTTP()
769 // <member-function-pointer> ::= $1? <name> in mangleMemberFunctionPointer()
774 // <auto-nttp> ::= $ M <type> 1? <name> in mangleMemberFunctionPointer()
775 // <auto-nttp> ::= $ M <type> H? <name> <number> in mangleMemberFunctionPointer()
776 // <auto-nttp> ::= $ M <type> I? <name> <number> <number> in mangleMemberFunctionPointer()
777 // <auto-nttp> ::= $ M <type> J? <name> <number> <number> <number> in mangleMemberFunctionPointer()
779 MSInheritanceModel IM = RD->getMSInheritanceModel(); in mangleMemberFunctionPointer()
789 // If non-virtual, mangle the name. If virtual, mangle as a virtual memptr in mangleMemberFunctionPointer()
799 PD && PD->getType()->getTypeClass() == Type::Auto && in mangleMemberFunctionPointer()
806 if (MD->isVirtual()) { in mangleMemberFunctionPointer()
810 VTContext->getMethodVFTableLocation(GlobalDecl(MD)); in mangleMemberFunctionPointer()
824 NVOffset -= getASTContext().getOffsetOfBaseWithVBPtr(RD).getQuantity(); in mangleMemberFunctionPointer()
832 VBTableOffset = -1; in mangleMemberFunctionPointer()
847 // <func-ptr> ::= $1? <mangled-name> in mangleFunctionPointer()
848 // <func-ptr> ::= <auto-nttp> in mangleFunctionPointer()
850 // <auto-nttp> ::= $ M <type> 1? <mangled-name> in mangleFunctionPointer()
855 PD && PD->getType()->getTypeClass() == Type::Auto && in mangleFunctionPointer()
869 // <var-ptr> ::= $1? <mangled-name> in mangleVarDecl()
870 // <var-ptr> ::= <auto-nttp> in mangleVarDecl()
872 // <auto-nttp> ::= $ M <type> 1? <mangled-name> in mangleVarDecl()
877 PD && PD->getType()->getTypeClass() == Type::Auto && in mangleVarDecl()
890 // <nttp-class-member-function-pointer> ::= <member-function-pointer> in mangleMemberFunctionPointerInClassNTTP()
892 // ::= E? <virtual-mem-ptr-thunk> in mangleMemberFunctionPointerInClassNTTP()
893 // ::= E? <mangled-name> <type-encoding> in mangleMemberFunctionPointerInClassNTTP()
896 if (RD->getMSInheritanceModel() != MSInheritanceModel::Single) in mangleMemberFunctionPointerInClassNTTP()
904 if (MD->isVirtual()) { in mangleMemberFunctionPointerInClassNTTP()
908 VTContext->getMethodVFTableLocation(GlobalDecl(MD)); in mangleMemberFunctionPointerInClassNTTP()
924 mangleName(MD->getParent()); in mangleVirtualMemPtrThunk()
928 mangleCallingConvention(MD->getType()->castAs<FunctionProtoType>(), in mangleVirtualMemPtrThunk()
929 MD->getSourceRange()); in mangleVirtualMemPtrThunk()
933 // <name> ::= <unscoped-name> {[<named-scope>]+ | [<nested-name>]}? @ in mangleName()
956 // <non-negative integer> ::= A@ # when Number == 0 in mangleNumber()
960 // <number> ::= [?] <non-negative integer> in mangleNumber()
963 Value = -Value; in mangleNumber()
1003 Out << (Value - 1); in mangleBits()
1022 if (const TemplateDecl *TD = FD->getPrimaryTemplate()) { in isTemplate()
1023 TemplateArgs = FD->getTemplateSpecializationArgs(); in isTemplate()
1031 TemplateArgs = &Spec->getTemplateArgs(); in isTemplate()
1032 return GD.getWithDecl(Spec->getSpecializedTemplate()); in isTemplate()
1038 TemplateArgs = &Spec->getTemplateArgs(); in isTemplate()
1039 return GD.getWithDecl(Spec->getSpecializedTemplate()); in isTemplate()
1048 // <unqualified-name> ::= <operator-name> in mangleUnqualifiedName()
1049 // ::= <ctor-dtor-name> in mangleUnqualifiedName()
1050 // ::= <source-name> in mangleUnqualifiedName()
1051 // ::= <template-name> in mangleUnqualifiedName()
1071 // namespace[s] -> type[ -> template-parameters] in mangleUnqualifiedName()
1073 // type [ -> template-parameters] in mangleUnqualifiedName()
1074 // \-> namespace[s] in mangleUnqualifiedName()
1080 // It's important to key cache reads off ND, not TD -- the same TD can in mangleUnqualifiedName()
1103 StringFound - NameBackReferences.begin(); in mangleUnqualifiedName()
1109 Out << Found->second << '@'; // Outputs a StringRef. in mangleUnqualifiedName()
1112 Out << Found->second; // Outputs a back reference (an int). in mangleUnqualifiedName()
1122 ((isa<FunctionDecl>(ND) && ND->hasAttr<CUDAGlobalAttr>()) || in mangleUnqualifiedName()
1125 ->getTemplatedDecl() in mangleUnqualifiedName()
1126 ->hasAttr<CUDAGlobalAttr>())) && in mangleUnqualifiedName()
1130 (llvm::Twine("__device_stub__") + II->getName()).str()); in mangleUnqualifiedName()
1132 mangleSourceName(II->getName()); in mangleUnqualifiedName()
1140 if (NS->isAnonymousNamespace()) { in mangleUnqualifiedName()
1158 const CXXRecordDecl *RD = VD->getType()->getAsCXXRecordDecl(); in mangleUnqualifiedName()
1182 mangleTemplateArgValue(TPO->getType().getUnqualifiedType(), in mangleUnqualifiedName()
1183 TPO->getValue(), TplArgKind::ClassNTTP); in mangleUnqualifiedName()
1189 if (const TypedefNameDecl *D = TD->getTypedefNameForAnonDecl()) { in mangleUnqualifiedName()
1190 assert(TD->getDeclContext() == D->getDeclContext() && in mangleUnqualifiedName()
1192 assert(D->getDeclName().getAsIdentifierInfo() && in mangleUnqualifiedName()
1194 mangleSourceName(D->getDeclName().getAsIdentifierInfo()->getName()); in mangleUnqualifiedName()
1199 if (Record->isLambda()) { in mangleUnqualifiedName()
1202 Decl *LambdaContextDecl = Record->getLambdaContextDecl(); in mangleUnqualifiedName()
1203 unsigned LambdaManglingNumber = Record->getLambdaManglingNumber(); in mangleUnqualifiedName()
1208 Parm ? dyn_cast<FunctionDecl>(Parm->getDeclContext()) : nullptr; in mangleUnqualifiedName()
1212 Func->getNumParams() - Parm->getFunctionScopeIndex(); in mangleUnqualifiedName()
1245 Name += "<unnamed-type-"; in mangleUnqualifiedName()
1246 Name += DD->getName(); in mangleUnqualifiedName()
1252 Name += "<unnamed-type-"; in mangleUnqualifiedName()
1253 Name += TND->getName(); in mangleUnqualifiedName()
1255 cast<EnumDecl>(TD)->enumerator_begin() != in mangleUnqualifiedName()
1256 cast<EnumDecl>(TD)->enumerator_end()) { in mangleUnqualifiedName()
1257 // Anonymous non-empty enums mangle in the first enumerator. in mangleUnqualifiedName()
1259 Name += "<unnamed-enum-"; in mangleUnqualifiedName()
1260 Name += ED->enumerator_begin()->getName(); in mangleUnqualifiedName()
1263 Name += "<unnamed-type-$S"; in mangleUnqualifiedName()
1308 // <operator-name> ::= ?B # (cast) in mangleUnqualifiedName()
1314 mangleOperatorName(Name.getCXXOverloadedOperator(), ND->getLocation()); in mangleUnqualifiedName()
1319 mangleSourceName(Name.getCXXLiteralIdentifier()->getName()); in mangleUnqualifiedName()
1331 // <postfix> ::= <unqualified-name> [<postfix>]
1337 for (unsigned I = 1, IE = ID->getChainingSize(); I < IE; ++I) in mangleNestedName()
1338 mangleSourceName("<unnamed-tag>"); in mangleNestedName()
1341 while (!DC->isTranslationUnit()) { in mangleNestedName()
1354 const unsigned ParameterDiscriminator) -> std::string { in mangleNestedName()
1365 unsigned Discriminator = BD->getBlockManglingNumber(); in mangleNestedName()
1373 if (const auto *MC = BD->getBlockManglingContextDecl()) in mangleNestedName()
1375 if (const auto *F = dyn_cast<FunctionDecl>(P->getDeclContext())) in mangleNestedName()
1377 F->getNumParams() - P->getFunctionScopeIndex(); in mangleNestedName()
1388 if (const auto *MC = BD->getBlockManglingContextDecl()) in mangleNestedName()
1434 DC = DC->getParent(); in mangleNestedName()
1443 // <operator-name> ::= ?1 # destructor in mangleCXXDtorType()
1445 // <operator-name> ::= ?_D # vbase destructor in mangleCXXDtorType()
1447 // <operator-name> ::= ?_G # scalar deleting destructor in mangleCXXDtorType()
1449 // <operator-name> ::= ?_E # vector deleting destructor in mangleCXXDtorType()
1463 // <operator-name> ::= ?2 # new in mangleOperatorName()
1465 // <operator-name> ::= ?3 # delete in mangleOperatorName()
1467 // <operator-name> ::= ?4 # = in mangleOperatorName()
1469 // <operator-name> ::= ?5 # >> in mangleOperatorName()
1471 // <operator-name> ::= ?6 # << in mangleOperatorName()
1473 // <operator-name> ::= ?7 # ! in mangleOperatorName()
1475 // <operator-name> ::= ?8 # == in mangleOperatorName()
1477 // <operator-name> ::= ?9 # != in mangleOperatorName()
1479 // <operator-name> ::= ?A # [] in mangleOperatorName()
1482 // <operator-name> ::= ?C # -> in mangleOperatorName()
1484 // <operator-name> ::= ?D # * in mangleOperatorName()
1486 // <operator-name> ::= ?E # ++ in mangleOperatorName()
1488 // <operator-name> ::= ?F # -- in mangleOperatorName()
1490 // <operator-name> ::= ?G # - in mangleOperatorName()
1492 // <operator-name> ::= ?H # + in mangleOperatorName()
1494 // <operator-name> ::= ?I # & in mangleOperatorName()
1496 // <operator-name> ::= ?J # ->* in mangleOperatorName()
1498 // <operator-name> ::= ?K # / in mangleOperatorName()
1500 // <operator-name> ::= ?L # % in mangleOperatorName()
1502 // <operator-name> ::= ?M # < in mangleOperatorName()
1504 // <operator-name> ::= ?N # <= in mangleOperatorName()
1506 // <operator-name> ::= ?O # > in mangleOperatorName()
1508 // <operator-name> ::= ?P # >= in mangleOperatorName()
1510 // <operator-name> ::= ?Q # , in mangleOperatorName()
1512 // <operator-name> ::= ?R # () in mangleOperatorName()
1514 // <operator-name> ::= ?S # ~ in mangleOperatorName()
1516 // <operator-name> ::= ?T # ^ in mangleOperatorName()
1518 // <operator-name> ::= ?U # | in mangleOperatorName()
1520 // <operator-name> ::= ?V # && in mangleOperatorName()
1522 // <operator-name> ::= ?W # || in mangleOperatorName()
1524 // <operator-name> ::= ?X # *= in mangleOperatorName()
1526 // <operator-name> ::= ?Y # += in mangleOperatorName()
1528 // <operator-name> ::= ?Z # -= in mangleOperatorName()
1530 // <operator-name> ::= ?_0 # /= in mangleOperatorName()
1532 // <operator-name> ::= ?_1 # %= in mangleOperatorName()
1534 // <operator-name> ::= ?_2 # >>= in mangleOperatorName()
1536 // <operator-name> ::= ?_3 # <<= in mangleOperatorName()
1538 // <operator-name> ::= ?_4 # &= in mangleOperatorName()
1540 // <operator-name> ::= ?_5 # |= in mangleOperatorName()
1542 // <operator-name> ::= ?_6 # ^= in mangleOperatorName()
1571 // <operator-name> ::= ?_U # new[] in mangleOperatorName()
1573 // <operator-name> ::= ?_V # delete[] in mangleOperatorName()
1575 // <operator-name> ::= ?__L # co_await in mangleOperatorName()
1577 // <operator-name> ::= ?__M # <=> in mangleOperatorName()
1602 Out << (Found - NameBackReferences.begin()); in mangleSourceName()
1612 // <template-name> ::= <unscoped-template-name> <template-args> in mangleTemplateInstantiationName()
1637 // <unscoped-template-name> ::= ?$ <unqualified-name> in mangleUnscopedTemplateName()
1645 // <integer-literal> ::= $0 <number> in mangleIntegerLiteral()
1646 // <integer-literal> ::= <auto-nttp> in mangleIntegerLiteral()
1648 // <auto-nttp> ::= $ M <type> 0 <number> in mangleIntegerLiteral()
1655 PD && PD->getType()->getTypeClass() == Type::Auto && in mangleIntegerLiteral()
1670 E->getIntegerConstantExpr(Context.getASTContext())) { in mangleExpression()
1671 mangleIntegerLiteral(*Value, PD, E->getType()); in mangleExpression()
1679 Diags.Report(E->getExprLoc(), DiagID) << E->getStmtClassName() in mangleExpression()
1680 << E->getSourceRange(); in mangleExpression()
1685 // <template-args> ::= <template-arg>+ in mangleTemplateArgs()
1686 const TemplateParameterList *TPL = TD->getTemplateParameters(); in mangleTemplateArgs()
1687 assert(TPL->size() == TemplateArgs.size() && in mangleTemplateArgs()
1695 TemplateArgs[i - 1].getKind() == TemplateArgument::Pack) in mangleTemplateArgs()
1698 mangleTemplateArg(TD, TA, TPL->getParam(i)); in mangleTemplateArgs()
1706 if (!T->isPointerType() || !V.isLValue() || !V.hasLValuePath() || in getAsArrayToPointerDecayedDecl()
1711 if (!BaseT->isArrayType() || V.getLValuePath().size() != 1 || in getAsArrayToPointerDecayedDecl()
1721 // <template-arg> ::= <type> in mangleTemplateArg()
1722 // ::= <integer-literal> in mangleTemplateArg()
1723 // ::= <member-data-pointer> in mangleTemplateArg()
1724 // ::= <member-function-pointer> in mangleTemplateArg()
1725 // ::= $ <constant-value> in mangleTemplateArg()
1726 // ::= $ <auto-nttp-constant-value> in mangleTemplateArg()
1727 // ::= <template-args> in mangleTemplateArg()
1729 // <auto-nttp-constant-value> ::= M <type> <constant-value> in mangleTemplateArg()
1731 // <constant-value> ::= 0 <number> # integer in mangleTemplateArg()
1732 // ::= 1 <mangled-name> # address of D in mangleTemplateArg()
1733 // ::= 2 <type> <typed-constant-value>* @ # struct in mangleTemplateArg()
1734 // ::= 3 <type> <constant-value>* @ # array in mangleTemplateArg()
1736 // ::= 5 <constant-value> @ # address of subobject in mangleTemplateArg()
1737 // ::= 6 <constant-value> <unqualified-name> @ # a.b in mangleTemplateArg()
1738 // ::= 7 <type> [<unqualified-name> <constant-value>] @ in mangleTemplateArg()
1741 // ::= 8 <class> <unqualified-name> @ in mangleTemplateArg()
1742 // ::= A <type> <non-negative integer> # float in mangleTemplateArg()
1743 // ::= B <type> <non-negative integer> # double in mangleTemplateArg()
1747 // ::= H <mangled-name> <number> in mangleTemplateArg()
1748 // ::= I <mangled-name> <number> <number> in mangleTemplateArg()
1749 // ::= J <mangled-name> <number> <number> <number> in mangleTemplateArg()
1751 // <typed-constant-value> ::= [<type>] <constant-value> in mangleTemplateArg()
1753 // The <type> appears to be included in a <typed-constant-value> only in the in mangleTemplateArg()
1769 mangleMemberDataPointer(cast<CXXRecordDecl>(ND->getDeclContext()) in mangleTemplateArg()
1770 ->getMostRecentNonInjectedDecl(), in mangleTemplateArg()
1776 if (MD && MD->isInstance()) { in mangleTemplateArg()
1778 MD->getParent()->getMostRecentNonInjectedDecl(), MD, in mangleTemplateArg()
1784 } else if (TA.getParamTypeForDecl()->isRecordType()) { in mangleTemplateArg()
1787 mangleTemplateArgValue(TPO->getType().getUnqualifiedType(), in mangleTemplateArg()
1788 TPO->getValue(), TplArgKind::ClassNTTP); in mangleTemplateArg()
1805 if (const MemberPointerType *MPT = T->getAs<MemberPointerType>()) { in mangleTemplateArg()
1806 const CXXRecordDecl *RD = MPT->getMostRecentCXXRecordDecl(); in mangleTemplateArg()
1807 if (MPT->isMemberFunctionPointerType() && in mangleTemplateArg()
1812 if (MPT->isMemberDataPointer()) { in mangleTemplateArg()
1818 // which is initialized with either 0 or -1. Why -1? Well, we need to in mangleTemplateArg()
1822 // non-nullptr member pointers. in mangleTemplateArg()
1823 if (!RD->nullFieldOffsetIsZero()) { in mangleTemplateArg()
1824 mangleIntegerLiteral(llvm::APSInt::get(-1), in mangleTemplateArg()
1837 // Mangle the result of array-to-pointer decay as if it were a reference in mangleTemplateArg()
1845 ->getType() in mangleTemplateArg()
1846 ->getContainedDeducedType()) { in mangleTemplateArg()
1881 TA.getAsTemplate().getAsTemplateDecl()->getTemplatedDecl(); in mangleTemplateArg()
1926 // We don't know how to mangle past-the-end pointers yet. in mangleTemplateArgValue()
1932 // Taking the address of a complete object has a special-case mangling. in mangleTemplateArgValue()
1950 if (TAK == TplArgKind::ClassNTTP && T->isPointerType()) in mangleTemplateArgValue()
1957 if (auto *AT = ET->getAsArrayTypeUnsafe()) { in mangleTemplateArgValue()
1964 ET = AT->getElementType(); in mangleTemplateArgValue()
1970 ET = FD->getType(); in mangleTemplateArgValue()
1971 if (const auto *RD = ET->getAsRecordDecl()) in mangleTemplateArgValue()
1972 if (RD->isAnonymousStructOrUnion()) in mangleTemplateArgValue()
1999 if (TAK == TplArgKind::ClassNTTP && T->isPointerType()) in mangleTemplateArgValue()
2011 T->castAs<MemberPointerType>()->getMostRecentCXXRecordDecl(); in mangleTemplateArgValue()
2014 if (T->isMemberDataPointerType()) in mangleTemplateArgValue()
2020 if (T->isMemberDataPointerType()) in mangleTemplateArgValue()
2032 const CXXRecordDecl *RD = T->getAsCXXRecordDecl(); in mangleTemplateArgValue()
2036 for (const CXXBaseSpecifier &B : RD->bases()) in mangleTemplateArgValue()
2038 for (const FieldDecl *FD : RD->fields()) in mangleTemplateArgValue()
2039 if (!FD->isUnnamedBitField()) in mangleTemplateArgValue()
2040 mangleTemplateArgValue(FD->getType(), in mangleTemplateArgValue()
2041 V.getStructField(FD->getFieldIndex()), TAK, in mangleTemplateArgValue()
2052 mangleTemplateArgValue(FD->getType(), V.getUnionValue(), TAK); in mangleTemplateArgValue()
2078 QualType ElemT = getASTContext().getAsArrayType(T)->getElementType(); in mangleTemplateArgValue()
2097 QualType ElemT = T->castAs<VectorType>()->getElementType(); in mangleTemplateArgValue()
2126 Extra.mangleArtificialTagType(TagTypeKind::Struct, PD->getName()); in mangleObjCProtocol()
2171 ->castAs<ObjCObjectType>(), in mangleObjCKindOfType()
2179 // <cvr-qualifiers> ::= [E] [F] [I] <base-cvr-qualifiers> in mangleQualifiers()
2180 // 'E' means __ptr64 (32-bit only); 'F' means __unaligned (32/64-bit only); in mangleQualifiers()
2181 // 'I' means __restrict (32/64-bit). in mangleQualifiers()
2184 // <base-cvr-qualifiers> ::= A # near in mangleQualifiers()
2188 // ::= E # far (16-bit) in mangleQualifiers()
2189 // ::= F # far const (16-bit) in mangleQualifiers()
2190 // ::= G # far volatile (16-bit) in mangleQualifiers()
2191 // ::= H # far const volatile (16-bit) in mangleQualifiers()
2192 // ::= I # huge (16-bit) in mangleQualifiers()
2193 // ::= J # huge const (16-bit) in mangleQualifiers()
2194 // ::= K # huge volatile (16-bit) in mangleQualifiers()
2195 // ::= L # huge const volatile (16-bit) in mangleQualifiers()
2204 // ::= U # far member (16-bit) in mangleQualifiers()
2205 // ::= V # far const member (16-bit) in mangleQualifiers()
2206 // ::= W # far volatile member (16-bit) in mangleQualifiers()
2207 // ::= X # far const volatile member (16-bit) in mangleQualifiers()
2208 // ::= Y # huge member (16-bit) in mangleQualifiers()
2209 // ::= Z # huge const member (16-bit) in mangleQualifiers()
2210 // ::= 0 # huge volatile member (16-bit) in mangleQualifiers()
2211 // ::= 1 # huge const volatile member (16-bit) in mangleQualifiers()
2261 // <ref-qualifier> ::= G # lvalue reference in mangleRefQualifier()
2262 // ::= H # rvalue-reference in mangleRefQualifier()
2279 // Check if this is a default 64-bit pointer or has __ptr64 qualifier. in manglePointerExtQualifiers()
2282 if (is64Bit && (PointeeType.isNull() || !PointeeType->isFunctionType())) in manglePointerExtQualifiers()
2294 // <pointer-cv-qualifiers> ::= P # no qualifiers in manglePointerCVQualifiers()
2317 // Decayed types do not match up with non-decayed versions of the same type. in mangleFunctionArgumentType()
2322 if (const auto *DT = T->getAs<DecayedType>()) { in mangleFunctionArgumentType()
2323 QualType OriginalType = DT->getOriginalType(); in mangleFunctionArgumentType()
2324 // All decayed ArrayTypes should be treated identically; as-if they were in mangleFunctionArgumentType()
2328 AT->getElementType(), AT->getSizeModifier(), in mangleFunctionArgumentType()
2329 AT->getIndexTypeCVRQualifiers()); in mangleFunctionArgumentType()
2336 // int [] -> int * const in mangleFunctionArgumentType()
2337 if (OriginalType->isArrayType()) in mangleFunctionArgumentType()
2353 bool LongerThanOneChar = (Out.tell() - OutSizeBefore > 1); in mangleFunctionArgumentType()
2359 Out << Found->second; in mangleFunctionArgumentType()
2365 int Type = POSA->getType(); in manglePassObjectSizeArg()
2366 bool Dynamic = POSA->isDynamic(); in manglePassObjectSizeArg()
2383 Out << Found->second; in manglePassObjectSizeArg()
2395 // <language_addr_space> ::= <OpenCL-addrspace> | <CUDA-addrspace> in mangleAddressSpaceType()
2396 // <OpenCL-addrspace> ::= "CL" [ "global" | "local" | "constant" | in mangleAddressSpaceType()
2398 // <CUDA-addrspace> ::= "CU" [ "device" | "constant" | "shared" ] in mangleAddressSpaceType()
2401 // In the case of a non-language specific address space: in mangleAddressSpaceType()
2478 bool IsPointer = T->isAnyPointerType() || T->isMemberPointerType() || in mangleType()
2479 T->isReferenceType() || T->isBlockPointerType(); in mangleType()
2514 switch (ty->getTypeClass()) { in mangleType()
2518 llvm_unreachable("can't mangle non-canonical type " #CLASS "Type"); \ in mangleType()
2533 // <type> ::= <builtin-type> in mangleType()
2534 // <builtin-type> ::= X # void in mangleType()
2560 switch (T->getKind()) { in mangleType()
2745 DiagnosticsEngine::Error, "cannot mangle this built-in %0 type yet"); in mangleType()
2747 << T->getName(Context.getASTContext().getPrintingPolicy()) << Range; in mangleType()
2753 // <type> ::= <function-type>
2758 // FIXME: This may not be lambda-friendly. in mangleType()
2759 if (T->getMethodQuals() || T->getRefQualifier() != RQ_None) { in mangleType()
2777 // <function-type> ::= <this-cvr-qualifiers> <calling-convention> in mangleFunctionType()
2778 // <return-type> <argument-list> <throw-spec> in mangleFunctionType()
2782 if (D) Range = D->getSourceRange(); in mangleFunctionType()
2786 CallingConv CC = T->getCallConv(); in mangleFunctionType()
2788 if (MD->getParent()->isLambda()) in mangleFunctionType()
2790 if (MD->isImplicitObjectMemberFunction()) in mangleFunctionType()
2808 Qualifiers Quals = Proto->getMethodQuals(); in mangleFunctionType()
2810 mangleRefQualifier(Proto->getRefQualifier()); in mangleFunctionType()
2816 // <return-type> ::= <type> in mangleFunctionType()
2843 Proto->getParamType(0) in mangleFunctionType()
2844 ->castAs<LValueReferenceType>() in mangleFunctionType()
2845 ->getPointeeType(), in mangleFunctionType()
2860 mangleType(T->getReturnType(), Range, QMM_Result); in mangleFunctionType()
2862 QualType ResultType = T->getReturnType(); in mangleFunctionType()
2869 ResultType->getContainedAutoType())) { in mangleFunctionType()
2873 assert(AT->getKeyword() != AutoTypeKeyword::GNUAutoType && in mangleFunctionType()
2875 mangleSourceName(AT->isDecltypeAuto() ? "<decltype-auto>" : "<auto>"); in mangleFunctionType()
2880 if (ResultType->isVoidType()) in mangleFunctionType()
2886 // <argument-list> ::= X # void in mangleFunctionType()
2894 } else if (Proto->getNumParams() == 0 && !Proto->isVariadic()) { in mangleFunctionType()
2898 for (unsigned I = 0, E = Proto->getNumParams(); I != E; ++I) { in mangleFunctionType()
2900 if (I == 0 && D && D->getParamDecl(I)->isExplicitObjectParameter()) in mangleFunctionType()
2903 mangleFunctionArgumentType(Proto->getParamType(I), Range); in mangleFunctionType()
2907 // pretend it resides in a top-level namespace called __clang. in mangleFunctionType()
2913 if (const auto *P = D->getParamDecl(I)->getAttr<PassObjectSizeAttr>()) in mangleFunctionType()
2916 // <builtin-type> ::= Z # ellipsis in mangleFunctionType()
2917 if (Proto->isVariadic()) in mangleFunctionType()
2932 // <function-class> ::= <member-function> E? # E designates a 64-bit 'this' in mangleFunctionClass()
2933 // # pointer. in 64-bit mode *all* in mangleFunctionClass()
2934 // # 'this' pointers are 64-bit. in mangleFunctionClass()
2935 // ::= <global-function> in mangleFunctionClass()
2936 // <member-function> ::= A # private: near in mangleFunctionClass()
2954 // <global-function> ::= Y # global near in mangleFunctionClass()
2957 bool IsVirtual = MD->isVirtual(); in mangleFunctionClass()
2964 switch (MD->getAccess()) { in mangleFunctionClass()
2968 if (!MD->isImplicitObjectMemberFunction()) in mangleFunctionClass()
2976 if (!MD->isImplicitObjectMemberFunction()) in mangleFunctionClass()
2984 if (!MD->isImplicitObjectMemberFunction()) in mangleFunctionClass()
2997 // <calling-convention> ::= A # __cdecl in mangleCallingConvention()
3008 // ::= S # __attribute__((__swiftcall__)) // Clang-only in mangleCallingConvention()
3012 // Clang-only in mangleCallingConvention()
3013 // // Clang-only in mangleCallingConvention()
3072 mangleCallingConvention(T->getCallConv(), Range); in mangleCallingConvention()
3077 // <throw-spec> ::= Z # (default) in mangleThrowSpecification()
3079 if (FT->canThrow()) in mangleThrowSpecification()
3096 // <type> ::= <union-type> | <struct-type> | <class-type> | <enum-type>
3097 // <union-type> ::= T <name>
3098 // <struct-type> ::= U <name>
3099 // <class-type> ::= V <name>
3100 // <enum-type> ::= W4 <name>
3120 mangleType(cast<TagType>(T)->getDecl()); in mangleType()
3124 mangleType(cast<TagType>(T)->getDecl()); in mangleType()
3127 mangleTagTypeKind(TD->getTagKind()); in mangleType()
3135 // <name> ::= <unscoped-name> {[<named-scope>]+ | [<nested-name>]}? @ in mangleArtificialTagType()
3148 // <type> ::= <array-type>
3149 // <array-type> ::= <pointer-cvr-qualifiers> <cvr-qualifiers>
3150 // [Y <dimension-count> <dimension>+]
3151 // <element-type> # as global, E is never required
3158 manglePointerCVQualifiers(T->getElementType().getQualifiers()); in mangleDecayedArrayType()
3159 mangleType(T->getElementType(), SourceRange()); in mangleDecayedArrayType()
3181 if (ElementTy->isConstantArrayType()) { in mangleArrayType()
3184 Dimensions.push_back(CAT->getSize()); in mangleArrayType()
3185 ElementTy = CAT->getElementType(); in mangleArrayType()
3186 } else if (ElementTy->isIncompleteArrayType()) { in mangleArrayType()
3190 ElementTy = IAT->getElementType(); in mangleArrayType()
3191 } else if (ElementTy->isVariableArrayType()) { in mangleArrayType()
3195 ElementTy = VAT->getElementType(); in mangleArrayType()
3196 } else if (ElementTy->isDependentSizedArrayType()) { in mangleArrayType()
3202 "cannot mangle this dependent-length array yet"); in mangleArrayType()
3203 Diags.Report(DSAT->getSizeExpr()->getExprLoc(), DiagID) in mangleArrayType()
3204 << DSAT->getBracketsRange(); in mangleArrayType()
3211 // <dimension-count> ::= <number> # number of extra dimensions in mangleArrayType()
3223 // <type> ::= <pointer-to-member-type>
3224 // <pointer-to-member-type> ::= <pointer-cvr-qualifiers> <cvr-qualifiers>
3228 QualType PointeeType = T->getPointeeType(); in mangleType()
3231 if (const FunctionProtoType *FPT = PointeeType->getAs<FunctionProtoType>()) { in mangleType()
3233 mangleName(T->getClass()->castAs<RecordType>()->getDecl()); in mangleType()
3237 mangleName(T->getClass()->castAs<RecordType>()->getDecl()); in mangleType()
3260 // <type> ::= <pointer-type>
3261 // <pointer-type> ::= E? <pointer-cvr-qualifiers> <cvr-qualifiers> <type>
3262 // # the E is required for 64-bit non-static pointers
3265 QualType PointeeType = T->getPointeeType(); in mangleType()
3280 QualType PointeeType = T->getPointeeType(); in mangleType()
3295 // <type> ::= <reference-type>
3296 // <reference-type> ::= A E? <cvr-qualifiers> <type>
3297 // # the E is required for 64-bit non-static lvalue references
3300 QualType PointeeType = T->getPointeeType(); in mangleType()
3307 // <type> ::= <r-value-reference-type>
3308 // <r-value-reference-type> ::= $$Q E? <cvr-qualifiers> <type>
3309 // # the E is required for 64-bit non-static rvalue references
3312 QualType PointeeType = T->getPointeeType(); in mangleType()
3321 QualType ElementType = T->getElementType(); in mangleType()
3336 // (It doesn't matter for Objective-C types and the like that cl.exe doesn't
3340 switch (ty->getTypeClass()) { in isArtificialTagType()
3347 // just always return true (the other vector types are clang-only). in isArtificialTagType()
3355 QualType EltTy = T->getElementType(); in mangleType()
3356 const BuiltinType *ET = EltTy->getAs<BuiltinType>(); in mangleType()
3357 const BitIntType *BitIntTy = EltTy->getAs<BitIntType>(); in mangleType()
3359 "vectors with non-builtin/_BitInt elements are unsupported"); in mangleType()
3366 if (Width == 64 && ET->getKind() == BuiltinType::LongLong) { in mangleType()
3369 if (ET->getKind() == BuiltinType::Float) in mangleType()
3372 else if (ET->getKind() == BuiltinType::LongLong) in mangleType()
3375 else if (ET->getKind() == BuiltinType::Double) in mangleType()
3385 // our own mangling to handle uses of __vector_size__ on user-specified in mangleType()
3395 Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(T->getNumElements())); in mangleType()
3411 "cannot mangle this dependent-sized vector type yet"); in mangleType()
3419 "cannot mangle this dependent-sized extended vector type yet"); in mangleType()
3437 "Cannot mangle this dependent-sized matrix type yet"); in mangleType()
3454 mangleName(T->getDecl()); in mangleType()
3459 if (T->isKindOfType()) in mangleType()
3462 if (T->qual_empty() && !T->isSpecialized()) in mangleType()
3463 return mangleType(T->getBaseType(), Range, QMM_Drop); in mangleType()
3476 if (T->isObjCId()) in mangleType()
3478 else if (T->isObjCClass()) in mangleType()
3481 mangleSourceName(T->getInterface()->getName()); in mangleType()
3483 for (const auto &Q : T->quals()) in mangleType()
3486 if (T->isSpecialized()) in mangleType()
3487 for (const auto &TA : T->getTypeArgs()) in mangleType()
3501 QualType PointeeType = T->getPointeeType(); in mangleType()
3507 mangleFunctionType(PointeeType->castAs<FunctionProtoType>()); in mangleType()
3555 mangleType(T->getSelectedType(), Range); in mangleType()
3596 assert(T->getDeducedType().isNull() && "expecting a dependent type!"); in mangleType()
3607 assert(T->getDeducedType().isNull() && "expecting a dependent type!"); in mangleType()
3618 QualType ValueType = T->getValueType(); in mangleType()
3632 QualType ElementType = T->getElementType(); in mangleType()
3640 Extra.mangleIntegerLiteral(llvm::APSInt::get(T->isReadOnly())); in mangleType()
3676 if (T->isUnsigned()) in mangleType()
3680 Extra.mangleIntegerLiteral(llvm::APSInt::getUnsigned(T->getNumBits())); in mangleType()
3693 // <this-adjustment> ::= <no-adjustment> | <static-adjustment> |
3694 // <virtual-adjustment>
3695 // <no-adjustment> ::= A # private near
3701 // <static-adjustment> ::= G <static-offset> # private near
3702 // ::= H <static-offset> # private far
3703 // ::= O <static-offset> # protected near
3704 // ::= P <static-offset> # protected far
3705 // ::= W <static-offset> # public near
3706 // ::= X <static-offset> # public far
3707 // <virtual-adjustment> ::= $0 <virtual-shift> <static-offset> # private near
3708 // ::= $1 <virtual-shift> <static-offset> # private far
3709 // ::= $2 <virtual-shift> <static-offset> # protected near
3710 // ::= $3 <virtual-shift> <static-offset> # protected far
3711 // ::= $4 <virtual-shift> <static-offset> # public near
3712 // ::= $5 <virtual-shift> <static-offset> # public far
3713 // <virtual-shift> ::= <vtordisp-shift> | <vtordispex-shift>
3714 // <vtordisp-shift> ::= <offset-to-vtordisp>
3715 // <vtordispex-shift> ::= <offset-to-vbptr> <vbase-offset-offset>
3716 // <offset-to-vtordisp>
3749 Mangler.mangleNumber(-static_cast<uint32_t>(Adjustment.NonVirtual)); in mangleThunkThisAdjustment()
3764 Mangler.mangleNumber(-static_cast<uint32_t>(Adjustment.NonVirtual)); in mangleThunkThisAdjustment()
3802 AccessSpecifier AS = Thunk.Return.isEmpty() ? MD->getAccess() : AS_public; in mangleThunk()
3811 DeclForFPT->getType()->castAs<FunctionProtoType>(), MD); in mangleThunk()
3826 Mangler.mangleName(DD->getParent()); in mangleCXXDtorThunk()
3828 mangleThunkThisAdjustment(DD->getAccess(), Adjustment, Mangler, MHO); in mangleCXXDtorThunk()
3829 Mangler.mangleFunctionType(DD->getType()->castAs<FunctionProtoType>(), DD); in mangleCXXDtorThunk()
3835 // <mangled-name> ::= ?_7 <class-name> <storage-class> in mangleCXXVFTable()
3836 // <cvr-qualifiers> [<name>] @ in mangleCXXVFTable()
3837 // NOTE: <cvr-qualifiers> here is always 'B' (const). <storage-class> in mangleCXXVFTable()
3841 if (Derived->hasAttr<DLLImportAttr>()) in mangleCXXVFTable()
3861 // <mangled-name> ::= ?_8 <class-name> <storage-class> in mangleCXXVBTable()
3862 // <cvr-qualifiers> [<name>] @ in mangleCXXVBTable()
3863 // NOTE: <cvr-qualifiers> here is always 'B' (const). <storage-class> in mangleCXXVBTable()
3942 // VS2015 and VS2017.1 omit the copy-constructor in the mangled name but in mangleCXXCatchableType()
3961 if (VBPtrOffset == -1) { in mangleCXXCatchableType()
4007 // <mangled-name> ::= ?_R4 <class-name> <storage-class> in mangleCXXRTTICompleteObjectLocator()
4008 // <cvr-qualifiers> [<name>] @ in mangleCXXRTTICompleteObjectLocator()
4009 // NOTE: <cvr-qualifiers> here is always 'B' (const). <storage-class> in mangleCXXRTTICompleteObjectLocator()
4034 // <mangled-name> ::= ?filt$ <filter-number> @0 in mangleSEHFilterExpression()
4046 // <mangled-name> ::= ?fin$ <filter-number> @0 in mangleSEHFinallyBlock()
4083 // <guard-name> ::= ?_B <postfix> @5 <scope-depth> in mangleStaticGuardVariable()
4084 // ::= ?__J <postfix> @5 <scope-depth> in mangleStaticGuardVariable()
4085 // ::= ?$S <guard-num> @ <postfix> @4IA in mangleStaticGuardVariable()
4096 bool Visible = VD->isExternallyVisible(); in mangleStaticGuardVariable()
4098 Mangler.getStream() << (VD->getTLSKind() ? "??__J" : "??_B"); in mangleStaticGuardVariable()
4121 if (D->isStaticDataMember()) { in mangleInitFiniStub()
4129 // This is the function class mangling. These stubs are global, non-variadic, in mangleInitFiniStub()
4136 // <initializer-name> ::= ?__E <name> YAXXZ in mangleDynamicInitializer()
4143 // <destructor-name> ::= ?__F <name> YAXXZ in mangleDynamicAtExitDestructor()
4149 // <char-type> ::= 0 # char, char16_t, char32_t in mangleStringLiteral()
4153 // <literal-length> ::= <non-negative integer> # the length of the literal in mangleStringLiteral()
4155 // <encoded-crc> ::= <hex digit>+ @ # crc of the literal including in mangleStringLiteral()
4158 // <encoded-string> ::= <simple character> # uninteresting character in mangleStringLiteral()
4162 // ::= '?' [a-z] # \xe1 - \xfa in mangleStringLiteral()
4163 // ::= '?' [A-Z] # \xc1 - \xda in mangleStringLiteral()
4164 // ::= '?' [0-9] # [,/\:. \n\t'-] in mangleStringLiteral()
4166 // <literal> ::= '??_C@_' <char-type> <literal-length> <encoded-crc> in mangleStringLiteral()
4167 // <encoded-string> '@' in mangleStringLiteral()
4174 // char bar[42] = "foobar"; in mangleStringLiteral()
4175 // Where it is truncated or zero-padded to fit the array. This is the length in mangleStringLiteral()
4176 // used for mangling, and any trailing null-bytes also need to be mangled. in mangleStringLiteral()
4178 getASTContext().getAsConstantArrayType(SL->getType())->getZExtSize(); in mangleStringLiteral()
4179 unsigned StringByteLength = StringLength * SL->getCharByteWidth(); in mangleStringLiteral()
4181 // <char-type>: The "kind" of string literal is encoded into the mangled name. in mangleStringLiteral()
4182 if (SL->isWide()) in mangleStringLiteral()
4187 // <literal-length>: The next part of the mangled name consists of the length in mangleStringLiteral()
4192 unsigned CharByteWidth = SL->getCharByteWidth(); in mangleStringLiteral()
4193 if (Index / CharByteWidth >= SL->getLength()) in mangleStringLiteral()
4195 uint32_t CodeUnit = SL->getCodeUnit(Index / CharByteWidth); in mangleStringLiteral()
4201 unsigned CharByteWidth = SL->getCharByteWidth(); in mangleStringLiteral()
4202 if (Index / CharByteWidth >= SL->getLength()) in mangleStringLiteral()
4204 uint32_t CodeUnit = SL->getCodeUnit(Index / CharByteWidth); in mangleStringLiteral()
4205 unsigned OffsetInCodeUnit = (CharByteWidth - 1) - (Index % CharByteWidth); in mangleStringLiteral()
4210 llvm::JamCRC JC; in mangleStringLiteral() local
4212 JC.update(GetLittleEndianByte(I)); in mangleStringLiteral()
4214 // <encoded-crc>: The CRC is encoded utilizing the standard number mangling in mangleStringLiteral()
4216 Mangler.mangleNumber(JC.getCRC()); in mangleStringLiteral()
4218 // <encoded-string>: The mangled name also contains the first 32 bytes in mangleStringLiteral()
4219 // (including null-terminator bytes) of the encoded StringLiteral. in mangleStringLiteral()
4224 // - [a-zA-Z0-9_$]: A one-to-one mapping. in mangleStringLiteral()
4225 // - ?[a-z]: The range from \xe1 to \xfa. in mangleStringLiteral()
4226 // - ?[A-Z]: The range from \xc1 to \xda. in mangleStringLiteral()
4227 // - ?[0-9]: The set of [,/\:. \n\t'-]. in mangleStringLiteral()
4228 // - ?$XX: A fallback which maps nibbles. in mangleStringLiteral()
4235 ' ', '\n', '\t', '\'', '-'}; in mangleStringLiteral()
4238 Mangler.getStream() << '?' << (Pos - std::begin(SpecialChars)); in mangleStringLiteral()
4248 unsigned MaxBytesToMangle = SL->isWide() ? 64U : 32U; in mangleStringLiteral()
4251 if (SL->isWide()) in mangleStringLiteral()