14 #ifndef LLVM_CLANG_AST_VTTBUILDER_H 15 #define LLVM_CLANG_AST_VTTBUILDER_H 20 #include "llvm/ADT/DenseMap.h" 21 #include "llvm/ADT/PointerIntPair.h" 22 #include "llvm/ADT/SmallPtrSet.h" 23 #include "llvm/ADT/SmallVector.h" 29 class ASTRecordLayout;
33 llvm::PointerIntPair<const CXXRecordDecl *, 1, bool> BaseAndIsVirtual;
39 : BaseAndIsVirtual(Base, BaseIsVirtual), BaseOffset(BaseOffset) {}
41 : BaseAndIsVirtual(Base.
getBase(), BaseIsVirtual),
45 return BaseAndIsVirtual.getPointer();
53 return BaseAndIsVirtual.getInt();
67 : VTableIndex(VTableIndex), VTableBase(VTableBase) {}
90 using VisitedVirtualBasesSetTy = llvm::SmallPtrSet<const CXXRecordDecl *, 4>;
92 using AddressPointsMapTy = llvm::DenseMap<BaseSubobject, uint64_t>;
95 llvm::DenseMap<BaseSubobject, uint64_t> SubVTTIndicies;
99 llvm::DenseMap<BaseSubobject, uint64_t> SecondaryVirtualPointerIndices;
102 bool GenerateDefinition;
117 bool BaseIsMorallyVirtual,
118 uint64_t VTableIndex,
120 VisitedVirtualBasesSetTy &VBases);
125 uint64_t VTableIndex);
130 VisitedVirtualBasesSetTy &VBases);
138 bool GenerateDefinition);
142 return VTTComponents;
152 return SubVTTIndicies;
156 const llvm::DenseMap<BaseSubobject, uint64_t> &
158 return SecondaryVirtualPointerIndices;
164 #endif // LLVM_CLANG_AST_VTTBUILDER_H
const llvm::DenseMap< BaseSubobject, uint64_t > & getSubVTTIndicies() const
Returns a reference to the sub-VTT indices.
VTTVTable(const CXXRecordDecl *Base, CharUnits BaseOffset, bool BaseIsVirtual)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
const VTTVTablesVectorTy & getVTTVTables() const
VTTVTable(BaseSubobject Base, bool BaseIsVirtual)
CharUnits - This is an opaque type for sizes expressed in character units.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const CXXRecordDecl * getBase() const
const VTTComponentsVectorTy & getVTTComponents() const
VTTComponent(uint64_t VTableIndex, BaseSubobject VTableBase)
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
const llvm::DenseMap< BaseSubobject, uint64_t > & getSecondaryVirtualPointerIndices() const
Returns a reference to the secondary virtual pointer indices.
Dataflow Directional Tag Classes.
Class for building VTT layout information.
BaseSubobject getBaseSubobject() const
Represents a C++ struct/union/class.
CharUnits getBaseOffset() const