llvm/clang/lib/AST/ItaniumMangle.cpp

//===--- ItaniumMangle.cpp - Itanium C++ Name Mangling ----------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Implements C++ name mangling according to the Itanium C++ ABI,
// which is used in GCC 3.2 and newer (and many compilers that are
// ABI-compatible with GCC):
//
//   http://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling
//
//===----------------------------------------------------------------------===//

#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprConcepts.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/ABI.h"
#include "clang/Basic/DiagnosticAST.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Thunk.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include <optional>

usingnamespaceclang;

namespace {

static bool isLocalContainerContext(const DeclContext *DC) {}

static const FunctionDecl *getStructor(const FunctionDecl *fn) {}

static const NamedDecl *getStructor(const NamedDecl *decl) {}

static bool isLambda(const NamedDecl *ND) {}

static const unsigned UnknownArity =;

class ItaniumMangleContextImpl : public ItaniumMangleContext {};

/// Manage the mangling of a single name.
class CXXNameMangler {};

}

NamespaceDecl *ItaniumMangleContextImpl::getStdNamespace() {}

/// Retrieve the declaration context that should be used when mangling the given
/// declaration.
const DeclContext *
ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) {}

bool ItaniumMangleContextImpl::isInternalLinkageDecl(const NamedDecl *ND) {}

// Check if this Function Decl needs a unique internal linkage name.
bool ItaniumMangleContextImpl::isUniqueInternalLinkageDecl(
    const NamedDecl *ND) {}

bool ItaniumMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {}

void CXXNameMangler::writeAbiTags(const NamedDecl *ND,
                                  const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleSourceNameWithAbiTags(
    const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangle(GlobalDecl GD) {}

void CXXNameMangler::mangleFunctionEncoding(GlobalDecl GD) {}

void CXXNameMangler::mangleFunctionEncodingBareType(const FunctionDecl *FD) {}

/// Return whether a given namespace is the 'std' namespace.
bool CXXNameMangler::isStd(const NamespaceDecl *NS) {}

// isStdNamespace - Return whether a given decl context is a toplevel 'std'
// namespace.
bool CXXNameMangler::isStdNamespace(const DeclContext *DC) {}

static const GlobalDecl
isTemplate(GlobalDecl GD, const TemplateArgumentList *&TemplateArgs) {}

static TemplateName asTemplateName(GlobalDecl GD) {}

void CXXNameMangler::mangleName(GlobalDecl GD) {}

const RecordDecl *CXXNameMangler::GetLocalClassDecl(const Decl *D) {}

void CXXNameMangler::mangleNameWithAbiTags(GlobalDecl GD,
                                           const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleModuleName(const NamedDecl *ND) {}

// <module-name> ::= <module-subname>
//		 ::= <module-name> <module-subname>
//	 	 ::= <substitution>
// <module-subname> ::= W <source-name>
//		    ::= W P <source-name>
void CXXNameMangler::mangleModuleNamePrefix(StringRef Name, bool IsPartition) {}

void CXXNameMangler::mangleTemplateName(const TemplateDecl *TD,
                                        ArrayRef<TemplateArgument> Args) {}

void CXXNameMangler::mangleUnscopedName(GlobalDecl GD, const DeclContext *DC,
                                        const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleUnscopedTemplateName(
    GlobalDecl GD, const DeclContext *DC, const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleFloat(const llvm::APFloat &f) {}

void CXXNameMangler::mangleFloatLiteral(QualType T, const llvm::APFloat &V) {}

void CXXNameMangler::mangleFixedPointLiteral() {}

void CXXNameMangler::mangleNullPointer(QualType T) {}

void CXXNameMangler::mangleNumber(const llvm::APSInt &Value) {}

void CXXNameMangler::mangleNumber(int64_t Number) {}

void CXXNameMangler::mangleCallOffset(int64_t NonVirtual, int64_t Virtual) {}

void CXXNameMangler::manglePrefix(QualType type) {}

/// Mangle everything prior to the base-unresolved-name in an unresolved-name.
///
/// \param recursive - true if this is being called recursively,
///   i.e. if there is more prefix "to the right".
void CXXNameMangler::mangleUnresolvedPrefix(NestedNameSpecifier *qualifier,
                                            bool recursive) {}

/// Mangle an unresolved-name, which is generally used for names which
/// weren't resolved to specific entities.
void CXXNameMangler::mangleUnresolvedName(
    NestedNameSpecifier *qualifier, DeclarationName name,
    const TemplateArgumentLoc *TemplateArgs, unsigned NumTemplateArgs,
    unsigned knownArity) {}

void CXXNameMangler::mangleUnqualifiedName(
    GlobalDecl GD, DeclarationName Name, const DeclContext *DC,
    unsigned KnownArity, const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleRegCallName(const IdentifierInfo *II) {}

void CXXNameMangler::mangleDeviceStubName(const IdentifierInfo *II) {}

void CXXNameMangler::mangleSourceName(const IdentifierInfo *II) {}

void CXXNameMangler::mangleNestedName(GlobalDecl GD,
                                      const DeclContext *DC,
                                      const AbiTagList *AdditionalAbiTags,
                                      bool NoFunction) {}
void CXXNameMangler::mangleNestedName(const TemplateDecl *TD,
                                      ArrayRef<TemplateArgument> Args) {}

void CXXNameMangler::mangleNestedNameWithClosurePrefix(
    GlobalDecl GD, const NamedDecl *PrefixND,
    const AbiTagList *AdditionalAbiTags) {}

static GlobalDecl getParentOfLocalEntity(const DeclContext *DC) {}

void CXXNameMangler::mangleLocalName(GlobalDecl GD,
                                     const AbiTagList *AdditionalAbiTags) {}

void CXXNameMangler::mangleBlockForPrefix(const BlockDecl *Block) {}

void CXXNameMangler::mangleUnqualifiedBlock(const BlockDecl *Block) {}

// <template-param-decl>
//   ::= Ty                                  # template type parameter
//   ::= Tk <concept name> [<template-args>] # constrained type parameter
//   ::= Tn <type>                           # template non-type parameter
//   ::= Tt <template-param-decl>* E [Q <requires-clause expr>]
//                                           # template template parameter
//   ::= Tp <template-param-decl>            # template parameter pack
void CXXNameMangler::mangleTemplateParamDecl(const NamedDecl *Decl) {}

void CXXNameMangler::mangleTemplateParameterList(
    const TemplateParameterList *Params) {}

void CXXNameMangler::mangleTypeConstraint(
    const ConceptDecl *Concept, ArrayRef<TemplateArgument> Arguments) {}

void CXXNameMangler::mangleTypeConstraint(const TypeConstraint *Constraint) {}

void CXXNameMangler::mangleRequiresClause(const Expr *RequiresClause) {}

void CXXNameMangler::mangleLambda(const CXXRecordDecl *Lambda) {}

void CXXNameMangler::mangleLambdaSig(const CXXRecordDecl *Lambda) {}

void CXXNameMangler::manglePrefix(NestedNameSpecifier *qualifier) {}

void CXXNameMangler::manglePrefix(const DeclContext *DC, bool NoFunction) {}

void CXXNameMangler::mangleTemplatePrefix(TemplateName Template) {}

void CXXNameMangler::mangleTemplatePrefix(GlobalDecl GD,
                                          bool NoFunction) {}

const NamedDecl *CXXNameMangler::getClosurePrefix(const Decl *ND) {}

void CXXNameMangler::mangleClosurePrefix(const NamedDecl *ND, bool NoFunction) {}

/// Mangles a template name under the production <type>.  Required for
/// template template arguments.
///   <type> ::= <class-enum-type>
///          ::= <template-param>
///          ::= <substitution>
void CXXNameMangler::mangleType(TemplateName TN) {}

bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty,
                                                    StringRef Prefix) {}

void CXXNameMangler::mangleOperatorName(DeclarationName Name, unsigned Arity) {}

void
CXXNameMangler::mangleOperatorName(OverloadedOperatorKind OO, unsigned Arity) {}

void CXXNameMangler::mangleQualifiers(Qualifiers Quals, const DependentAddressSpaceType *DAST) {}

void CXXNameMangler::mangleVendorQualifier(StringRef name) {}

void CXXNameMangler::mangleRefQualifier(RefQualifierKind RefQualifier) {}

void CXXNameMangler::mangleObjCMethodName(const ObjCMethodDecl *MD) {}

static bool isTypeSubstitutable(Qualifiers Quals, const Type *Ty,
                                ASTContext &Ctx) {}

void CXXNameMangler::mangleType(QualType T) {}

void CXXNameMangler::mangleCXXRecordDecl(const CXXRecordDecl *Record) {}

void CXXNameMangler::mangleType(const BuiltinType *T) {}

StringRef CXXNameMangler::getCallingConvQualifierName(CallingConv CC) {}

void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) {}

void
CXXNameMangler::mangleExtParameterInfo(FunctionProtoType::ExtParameterInfo PI) {}

// <type>          ::= <function-type>
// <function-type> ::= [<CV-qualifiers>] F [Y]
//                      <bare-function-type> [<ref-qualifier>] E
void CXXNameMangler::mangleType(const FunctionProtoType *T) {}

void CXXNameMangler::mangleType(const FunctionNoProtoType *T) {}

void CXXNameMangler::mangleBareFunctionType(const FunctionProtoType *Proto,
                                            bool MangleReturnType,
                                            const FunctionDecl *FD) {}

// <type>            ::= <class-enum-type>
// <class-enum-type> ::= <name>
void CXXNameMangler::mangleType(const UnresolvedUsingType *T) {}

// <type>            ::= <class-enum-type>
// <class-enum-type> ::= <name>
void CXXNameMangler::mangleType(const EnumType *T) {}
void CXXNameMangler::mangleType(const RecordType *T) {}
void CXXNameMangler::mangleType(const TagType *T) {}

// <type>       ::= <array-type>
// <array-type> ::= A <positive dimension number> _ <element type>
//              ::= A [<dimension expression>] _ <element type>
void CXXNameMangler::mangleType(const ConstantArrayType *T) {}
void CXXNameMangler::mangleType(const VariableArrayType *T) {}
void CXXNameMangler::mangleType(const DependentSizedArrayType *T) {}
void CXXNameMangler::mangleType(const IncompleteArrayType *T) {}

// <type>                   ::= <pointer-to-member-type>
// <pointer-to-member-type> ::= M <class type> <member type>
void CXXNameMangler::mangleType(const MemberPointerType *T) {}

// <type>           ::= <template-param>
void CXXNameMangler::mangleType(const TemplateTypeParmType *T) {}

// <type>           ::= <template-param>
void CXXNameMangler::mangleType(const SubstTemplateTypeParmPackType *T) {}

// <type> ::= P <type>   # pointer-to
void CXXNameMangler::mangleType(const PointerType *T) {}
void CXXNameMangler::mangleType(const ObjCObjectPointerType *T) {}

// <type> ::= R <type>   # reference-to
void CXXNameMangler::mangleType(const LValueReferenceType *T) {}

// <type> ::= O <type>   # rvalue reference-to (C++0x)
void CXXNameMangler::mangleType(const RValueReferenceType *T) {}

// <type> ::= C <type>   # complex pair (C 2000)
void CXXNameMangler::mangleType(const ComplexType *T) {}

// ARM's ABI for Neon vector types specifies that they should be mangled as
// if they are structs (to match ARM's initial implementation).  The
// vector type must be one of the special types predefined by ARM.
void CXXNameMangler::mangleNeonVectorType(const VectorType *T) {}

void CXXNameMangler::mangleNeonVectorType(const DependentVectorType *T) {}

static StringRef mangleAArch64VectorBase(const BuiltinType *EltType) {}

// AArch64's ABI for Neon vector types specifies that they should be mangled as
// the equivalent internal name. The vector type must be one of the special
// types predefined by ARM.
void CXXNameMangler::mangleAArch64NeonVectorType(const VectorType *T) {}
void CXXNameMangler::mangleAArch64NeonVectorType(const DependentVectorType *T) {}

// The AArch64 ACLE specifies that fixed-length SVE vector and predicate types
// defined with the 'arm_sve_vector_bits' attribute map to the same AAPCS64
// type as the sizeless variants.
//
// The mangling scheme for VLS types is implemented as a "pseudo" template:
//
//   '__SVE_VLS<<type>, <vector length>>'
//
// Combining the existing SVE type and a specific vector length (in bits).
// For example:
//
//   typedef __SVInt32_t foo __attribute__((arm_sve_vector_bits(512)));
//
// is described as '__SVE_VLS<__SVInt32_t, 512u>' and mangled as:
//
//   "9__SVE_VLSI" + base type mangling + "Lj" + __ARM_FEATURE_SVE_BITS + "EE"
//
//   i.e. 9__SVE_VLSIu11__SVInt32_tLj512EE
//
// The latest ACLE specification (00bet5) does not contain details of this
// mangling scheme, it will be specified in the next revision. The mangling
// scheme is otherwise defined in the appendices to the Procedure Call Standard
// for the Arm Architecture, see
// https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#appendix-c-mangling
void CXXNameMangler::mangleAArch64FixedSveVectorType(const VectorType *T) {}

void CXXNameMangler::mangleAArch64FixedSveVectorType(
    const DependentVectorType *T) {}

void CXXNameMangler::mangleRISCVFixedRVVVectorType(const VectorType *T) {}

void CXXNameMangler::mangleRISCVFixedRVVVectorType(
    const DependentVectorType *T) {}

// GNU extension: vector types
// <type>                  ::= <vector-type>
// <vector-type>           ::= Dv <positive dimension number> _
//                                    <extended element type>
//                         ::= Dv [<dimension expression>] _ <element type>
// <extended element type> ::= <element type>
//                         ::= p # AltiVec vector pixel
//                         ::= b # Altivec vector bool
void CXXNameMangler::mangleType(const VectorType *T) {}

void CXXNameMangler::mangleType(const DependentVectorType *T) {}

void CXXNameMangler::mangleType(const ExtVectorType *T) {}
void CXXNameMangler::mangleType(const DependentSizedExtVectorType *T) {}

void CXXNameMangler::mangleType(const ConstantMatrixType *T) {}

void CXXNameMangler::mangleType(const DependentSizedMatrixType *T) {}

void CXXNameMangler::mangleType(const DependentAddressSpaceType *T) {}

void CXXNameMangler::mangleType(const PackExpansionType *T) {}

void CXXNameMangler::mangleType(const PackIndexingType *T) {}

void CXXNameMangler::mangleType(const ObjCInterfaceType *T) {}

void CXXNameMangler::mangleType(const ObjCObjectType *T) {}

void CXXNameMangler::mangleType(const BlockPointerType *T) {}

void CXXNameMangler::mangleType(const InjectedClassNameType *T) {}

void CXXNameMangler::mangleType(const TemplateSpecializationType *T) {}

void CXXNameMangler::mangleType(const DependentNameType *T) {}

void CXXNameMangler::mangleType(const DependentTemplateSpecializationType *T) {}

void CXXNameMangler::mangleType(const TypeOfType *T) {}

void CXXNameMangler::mangleType(const TypeOfExprType *T) {}

void CXXNameMangler::mangleType(const DecltypeType *T) {}

void CXXNameMangler::mangleType(const UnaryTransformType *T) {}

void CXXNameMangler::mangleType(const AutoType *T) {}

void CXXNameMangler::mangleType(const DeducedTemplateSpecializationType *T) {}

void CXXNameMangler::mangleType(const AtomicType *T) {}

void CXXNameMangler::mangleType(const PipeType *T) {}

void CXXNameMangler::mangleType(const BitIntType *T) {}

void CXXNameMangler::mangleType(const DependentBitIntType *T) {}

void CXXNameMangler::mangleType(const ArrayParameterType *T) {}

void CXXNameMangler::mangleIntegerLiteral(QualType T,
                                          const llvm::APSInt &Value) {}

void CXXNameMangler::mangleMemberExprBase(const Expr *Base, bool IsArrow) {}

/// Mangles a member expression.
void CXXNameMangler::mangleMemberExpr(const Expr *base,
                                      bool isArrow,
                                      NestedNameSpecifier *qualifier,
                                      NamedDecl *firstQualifierLookup,
                                      DeclarationName member,
                                      const TemplateArgumentLoc *TemplateArgs,
                                      unsigned NumTemplateArgs,
                                      unsigned arity) {}

/// Look at the callee of the given call expression and determine if
/// it's a parenthesized id-expression which would have triggered ADL
/// otherwise.
static bool isParenthesizedADLCallee(const CallExpr *call) {}

void CXXNameMangler::mangleCastExpression(const Expr *E, StringRef CastEncoding) {}

void CXXNameMangler::mangleInitListElements(const InitListExpr *InitList) {}

void CXXNameMangler::mangleRequirement(SourceLocation RequiresExprLoc,
                                       const concepts::Requirement *Req) {}

void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity,
                                      bool AsTemplateArg) {}

/// Mangle an expression which refers to a parameter variable.
///
/// <expression>     ::= <function-param>
/// <function-param> ::= fp <top-level CV-qualifiers> _      # L == 0, I == 0
/// <function-param> ::= fp <top-level CV-qualifiers>
///                      <parameter-2 non-negative number> _ # L == 0, I > 0
/// <function-param> ::= fL <L-1 non-negative number>
///                      p <top-level CV-qualifiers> _       # L > 0, I == 0
/// <function-param> ::= fL <L-1 non-negative number>
///                      p <top-level CV-qualifiers>
///                      <I-1 non-negative number> _         # L > 0, I > 0
///
/// L is the nesting depth of the parameter, defined as 1 if the
/// parameter comes from the innermost function prototype scope
/// enclosing the current context, 2 if from the next enclosing
/// function prototype scope, and so on, with one special case: if
/// we've processed the full parameter clause for the innermost
/// function type, then L is one less.  This definition conveniently
/// makes it irrelevant whether a function's result type was written
/// trailing or leading, but is otherwise overly complicated; the
/// numbering was first designed without considering references to
/// parameter in locations other than return types, and then the
/// mangling had to be generalized without changing the existing
/// manglings.
///
/// I is the zero-based index of the parameter within its parameter
/// declaration clause.  Note that the original ABI document describes
/// this using 1-based ordinals.
void CXXNameMangler::mangleFunctionParam(const ParmVarDecl *parm) {}

void CXXNameMangler::mangleCXXCtorType(CXXCtorType T,
                                       const CXXRecordDecl *InheritedFrom) {}

void CXXNameMangler::mangleCXXDtorType(CXXDtorType T) {}

// Helper to provide ancillary information on a template used to mangle its
// arguments.
struct CXXNameMangler::TemplateArgManglingInfo {};

void CXXNameMangler::mangleTemplateArgs(TemplateName TN,
                                        const TemplateArgumentLoc *TemplateArgs,
                                        unsigned NumTemplateArgs) {}

void CXXNameMangler::mangleTemplateArgs(TemplateName TN,
                                        const TemplateArgumentList &AL) {}

void CXXNameMangler::mangleTemplateArgs(TemplateName TN,
                                        ArrayRef<TemplateArgument> Args) {}

void CXXNameMangler::mangleTemplateArg(TemplateArgManglingInfo &Info,
                                       unsigned Index, TemplateArgument A) {}

void CXXNameMangler::mangleTemplateArg(TemplateArgument A, bool NeedExactType) {}

void CXXNameMangler::mangleTemplateArgExpr(const Expr *E) {}

/// Determine whether a given value is equivalent to zero-initialization for
/// the purpose of discarding a trailing portion of a 'tl' mangling.
///
/// Note that this is not in general equivalent to determining whether the
/// value has an all-zeroes bit pattern.
static bool isZeroInitialized(QualType T, const APValue &V) {}

static QualType getLValueType(ASTContext &Ctx, const APValue &LV) {}

static IdentifierInfo *getUnionInitName(SourceLocation UnionLoc,
                                        DiagnosticsEngine &Diags,
                                        const FieldDecl *FD) {}

void CXXNameMangler::mangleValueInTemplateArg(QualType T, const APValue &V,
                                              bool TopLevel,
                                              bool NeedExactType) {}

void CXXNameMangler::mangleTemplateParameter(unsigned Depth, unsigned Index) {}

void CXXNameMangler::mangleSeqID(unsigned SeqID) {}

void CXXNameMangler::mangleExistingSubstitution(TemplateName tname) {}

// <substitution> ::= S <seq-id> _
//                ::= S_
bool CXXNameMangler::mangleSubstitution(const NamedDecl *ND) {}

bool CXXNameMangler::mangleSubstitution(NestedNameSpecifier *NNS) {}

/// Determine whether the given type has any qualifiers that are relevant for
/// substitutions.
static bool hasMangledSubstitutionQualifiers(QualType T) {}

bool CXXNameMangler::mangleSubstitution(QualType T) {}

bool CXXNameMangler::mangleSubstitution(TemplateName Template) {}

bool CXXNameMangler::mangleSubstitution(uintptr_t Ptr) {}

/// Returns whether S is a template specialization of std::Name with a single
/// argument of type A.
bool CXXNameMangler::isSpecializedAs(QualType S, llvm::StringRef Name,
                                     QualType A) {}

/// Returns whether SD is a template specialization std::Name<char,
/// std::char_traits<char> [, std::allocator<char>]>
/// HasAllocator controls whether the 3rd template argument is needed.
bool CXXNameMangler::isStdCharSpecialization(
    const ClassTemplateSpecializationDecl *SD, llvm::StringRef Name,
    bool HasAllocator) {}

bool CXXNameMangler::mangleStandardSubstitution(const NamedDecl *ND) {}

void CXXNameMangler::addSubstitution(QualType T) {}

void CXXNameMangler::addSubstitution(TemplateName Template) {}

void CXXNameMangler::addSubstitution(uintptr_t Ptr) {}

void CXXNameMangler::extendSubstitutions(CXXNameMangler* Other) {}

CXXNameMangler::AbiTagList
CXXNameMangler::makeFunctionReturnTypeTags(const FunctionDecl *FD) {}

CXXNameMangler::AbiTagList
CXXNameMangler::makeVariableTypeTags(const VarDecl *VD) {}

bool CXXNameMangler::shouldHaveAbiTags(ItaniumMangleContextImpl &C,
                                       const VarDecl *VD) {}

//

/// Mangles the name of the declaration D and emits that name to the given
/// output stream.
///
/// If the declaration D requires a mangled name, this routine will emit that
/// mangled name to \p os and return true. Otherwise, \p os will be unchanged
/// and this routine will return false. In this case, the caller should just
/// emit the identifier of the declaration (\c D->getIdentifier()) as its
/// name.
void ItaniumMangleContextImpl::mangleCXXName(GlobalDecl GD,
                                             raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXCtorComdat(const CXXConstructorDecl *D,
                                                   raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXDtorComdat(const CXXDestructorDecl *D,
                                                   raw_ostream &Out) {}

/// Mangles the pointer authentication override attribute for classes
/// that have explicit overrides for the vtable authentication schema.
///
/// The override is mangled as a parameterized vendor extension as follows
///
///   <type> ::= U "__vtptrauth" I
///                 <key>
///                 <addressDiscriminated>
///                 <extraDiscriminator>
///              E
///
/// The extra discriminator encodes the explicit value derived from the
/// override schema, e.g. if the override has specified type based
/// discrimination the encoded value will be the discriminator derived from the
/// type name.
static void mangleOverrideDiscrimination(CXXNameMangler &Mangler,
                                         ASTContext &Context,
                                         const ThunkInfo &Thunk) {}

void ItaniumMangleContextImpl::mangleThunk(const CXXMethodDecl *MD,
                                           const ThunkInfo &Thunk,
                                           bool ElideOverrideInfo,
                                           raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXDtorThunk(const CXXDestructorDecl *DD,
                                                  CXXDtorType Type,
                                                  const ThunkInfo &Thunk,
                                                  bool ElideOverrideInfo,
                                                  raw_ostream &Out) {}

/// Returns the mangled name for a guard variable for the passed in VarDecl.
void ItaniumMangleContextImpl::mangleStaticGuardVariable(const VarDecl *D,
                                                         raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleDynamicInitializer(const VarDecl *MD,
                                                        raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleDynamicAtExitDestructor(const VarDecl *D,
                                                             raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleDynamicStermFinalizer(const VarDecl *D,
                                                           raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleSEHFilterExpression(
    GlobalDecl EnclosingDecl, raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleSEHFinallyBlock(
    GlobalDecl EnclosingDecl, raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleItaniumThreadLocalInit(const VarDecl *D,
                                                            raw_ostream &Out) {}

void
ItaniumMangleContextImpl::mangleItaniumThreadLocalWrapper(const VarDecl *D,
                                                          raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleReferenceTemporary(const VarDecl *D,
                                                        unsigned ManglingNumber,
                                                        raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXVTable(const CXXRecordDecl *RD,
                                               raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXVTT(const CXXRecordDecl *RD,
                                            raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXCtorVTable(const CXXRecordDecl *RD,
                                                   int64_t Offset,
                                                   const CXXRecordDecl *Type,
                                                   raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXRTTI(QualType Ty, raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleCXXRTTIName(
    QualType Ty, raw_ostream &Out, bool NormalizeIntegers = false) {}

void ItaniumMangleContextImpl::mangleCanonicalTypeName(
    QualType Ty, raw_ostream &Out, bool NormalizeIntegers = false) {}

void ItaniumMangleContextImpl::mangleStringLiteral(const StringLiteral *, raw_ostream &) {}

void ItaniumMangleContextImpl::mangleLambdaSig(const CXXRecordDecl *Lambda,
                                               raw_ostream &Out) {}

void ItaniumMangleContextImpl::mangleModuleInitializer(const Module *M,
                                                       raw_ostream &Out) {}

ItaniumMangleContext *ItaniumMangleContext::create(ASTContext &Context,
                                                   DiagnosticsEngine &Diags,
                                                   bool IsAux) {}

ItaniumMangleContext *
ItaniumMangleContext::create(ASTContext &Context, DiagnosticsEngine &Diags,
                             DiscriminatorOverrideTy DiscriminatorOverride,
                             bool IsAux) {}