14 #ifndef LLVM_CLANG_LIB_CODEGEN_CGVTABLES_H
15 #define LLVM_CLANG_LIB_CODEGEN_CGVTABLES_H
22 #include "llvm/ADT/DenseMap.h"
23 #include "llvm/IR/GlobalVariable.h"
37 typedef llvm::DenseMap<BaseSubobject, uint64_t> VTableAddressPointsMapTy;
39 typedef std::pair<const CXXRecordDecl *, BaseSubobject> BaseSubobjectPairTy;
40 typedef llvm::DenseMap<BaseSubobjectPairTy, uint64_t> SubVTTIndiciesMapTy;
43 SubVTTIndiciesMapTy SubVTTIndicies;
45 typedef llvm::DenseMap<BaseSubobjectPairTy, uint64_t>
46 SecondaryVirtualPointerIndicesMapTy;
50 SecondaryVirtualPointerIndicesMapTy SecondaryVirtualPointerIndices;
67 unsigned NumVTableThunks, llvm::Constant *RTTI);
72 return *cast<ItaniumVTableContext>(VTContext);
76 return *cast<MicrosoftVTableContext>(VTContext);
94 llvm::GlobalVariable *
97 llvm::GlobalVariable::LinkageTypes
Linkage,
98 VTableAddressPointsMapTy& AddressPoints);
106 llvm::GlobalVariable::LinkageTypes
Linkage,
void EmitVTTDefinition(llvm::GlobalVariable *VTT, llvm::GlobalVariable::LinkageTypes Linkage, const CXXRecordDecl *RD)
EmitVTTDefinition - Emit the definition of the given vtable.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have...
uint64_t getAddressPoint(BaseSubobject Base, const CXXRecordDecl *RD)
uint64_t getSubVTTIndex(const CXXRecordDecl *RD, BaseSubobject Base)
The this pointer adjustment as well as an optional return adjustment for a thunk. ...
Enums/classes describing ABI related information about constructors, destructors and thunks...
ItaniumVTableContext & getItaniumVTableContext()
bool isVTableExternal(const CXXRecordDecl *RD)
llvm::GlobalVariable * GetAddrOfVTT(const CXXRecordDecl *RD)
GetAddrOfVTT - Get the address of the VTT for the given record decl.
Represents a single component in a vtable.
CodeGenVTables(CodeGenModule &CGM)
llvm::GlobalVariable * GenerateConstructionVTable(const CXXRecordDecl *RD, const BaseSubobject &Base, bool BaseIsVirtual, llvm::GlobalVariable::LinkageTypes Linkage, VTableAddressPointsMapTy &AddressPoints)
void EmitThunks(GlobalDecl GD)
EmitThunks - Emit the associated thunks for the given global decl.
uint64_t getSecondaryVirtualPointerIndex(const CXXRecordDecl *RD, BaseSubobject Base)
void GenerateClassData(const CXXRecordDecl *RD)
MicrosoftVTableContext & getMicrosoftVTableContext()
Represents a C++ struct/union/class.
llvm::Constant * CreateVTableInitializer(const CXXRecordDecl *RD, const VTableComponent *Components, unsigned NumComponents, const VTableLayout::VTableThunkTy *VTableThunks, unsigned NumVTableThunks, llvm::Constant *RTTI)
std::pair< uint64_t, ThunkInfo > VTableThunkTy