28 using namespace clang;
44 assert(RT &&
"type of VarDecl is expected to be RecordType.");
45 assert(RT->
getDecl()->
isUnion() &&
"RecordType is expected to be a union.");
47 return FD->getIdentifier();
56 llvm::DenseMap<const Type *, unsigned> ManglingNumbers;
57 llvm::DenseMap<const IdentifierInfo *, unsigned> VarManglingNumbers;
58 llvm::DenseMap<const IdentifierInfo *, unsigned> TagManglingNumbers;
61 unsigned getManglingNumber(
const CXXMethodDecl *CallOperator)
override {
67 Context.getFunctionType(Context.VoidTy, Proto->
getParamTypes(),
73 unsigned getManglingNumber(
const BlockDecl *BD)
override {
74 const Type *Ty =
nullptr;
75 return ++ManglingNumbers[Ty];
78 unsigned getStaticLocalNumber(
const VarDecl *VD)
override {
83 unsigned getManglingNumber(
const VarDecl *VD,
unsigned)
override {
87 Identifier = findAnonymousUnionVarDeclName(*VD);
89 return ++VarManglingNumbers[Identifier];
92 unsigned getManglingNumber(
const TagDecl *TD,
unsigned)
override {
97 class ItaniumCXXABI :
public CXXABI {
101 ItaniumCXXABI(
ASTContext &Ctx) : Context(Ctx) { }
103 std::pair<uint64_t, unsigned>
105 const TargetInfo &Target = Context.getTargetInfo();
111 return std::make_pair(Width, Align);
114 CallingConv getDefaultMethodCallConv(
bool isVariadic)
const override {
115 const llvm::Triple &T = Context.getTargetInfo().getTriple();
116 if (!isVariadic && T.isWindowsGNUEnvironment() &&
117 T.getArch() == llvm::Triple::x86)
132 Context.toCharUnitsFromBits(Context.getTargetInfo().getPointerWidth(0));
137 getCopyConstructorForExceptionObject(
CXXRecordDecl *RD)
override {
145 unsigned ParmIdx,
Expr *DAE)
override {}
148 unsigned ParmIdx)
override {
153 return new ItaniumNumberingContext();
159 return new ItaniumCXXABI(Ctx);
Defines the clang::ASTContext interface.
IdentifierInfo * getIdentifier() const
Represents a C++ constructor within a class.
ExtProtoInfo - Extra information about a function prototype.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ArrayRef< QualType > getParamTypes() const
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
RecordDecl * getDecl() const
CXXABI * CreateItaniumCXXABI(ASTContext &Ctx)
Creates an instance of a C++ ABI class.
bool isMemberFunctionPointer() const
unsigned getTypeWidth(IntType T) const
Return the width (in bits) of the specified integer type enum.
Exposes information about the current target.
Implements C++ ABI-specific semantic analysis functions.
CallingConv
CallingConv - Specifies the calling convention that a function uses.
unsigned getTypeAlign(IntType T) const
Return the alignment (in bits) of the specified integer type enum.
TagDecl - Represents the declaration of a struct/union/class/enum.
ASTContext & getASTContext() const LLVM_READONLY
Represents a static or instance method of a struct/union/class.
bool isDynamicClass() const
IntType
===-— Target Data Type Query Methods ----------------------------—===//
QualType getCanonicalType() const
CharUnits getNonVirtualSize() const
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
const FieldDecl * findFirstNamedDataMember() const
Represents a C++ struct/union/class.
Defines the clang::TargetInfo interface.
IntType getPtrDiffType(unsigned AddrSpace) const