15 #ifndef LLVM_CLANG_AST_VTTBUILDER_H 16 #define LLVM_CLANG_AST_VTTBUILDER_H 21 #include "llvm/ADT/DenseMap.h" 22 #include "llvm/ADT/PointerIntPair.h" 23 #include "llvm/ADT/SmallPtrSet.h" 24 #include "llvm/ADT/SmallVector.h" 30 class ASTRecordLayout;
34 llvm::PointerIntPair<const CXXRecordDecl *, 1, bool> BaseAndIsVirtual;
40 : BaseAndIsVirtual(Base, BaseIsVirtual), BaseOffset(BaseOffset) {}
42 : BaseAndIsVirtual(Base.
getBase(), BaseIsVirtual),
46 return BaseAndIsVirtual.getPointer();
54 return BaseAndIsVirtual.getInt();
68 : VTableIndex(VTableIndex), VTableBase(VTableBase) {}
91 using VisitedVirtualBasesSetTy = llvm::SmallPtrSet<const CXXRecordDecl *, 4>;
93 using AddressPointsMapTy = llvm::DenseMap<BaseSubobject, uint64_t>;
96 llvm::DenseMap<BaseSubobject, uint64_t> SubVTTIndicies;
100 llvm::DenseMap<BaseSubobject, uint64_t> SecondaryVirtualPointerIndices;
103 bool GenerateDefinition;
118 bool BaseIsMorallyVirtual,
119 uint64_t VTableIndex,
121 VisitedVirtualBasesSetTy &VBases);
126 uint64_t VTableIndex);
131 VisitedVirtualBasesSetTy &VBases);
139 bool GenerateDefinition);
143 return VTTComponents;
153 return SubVTTIndicies;
157 const llvm::DenseMap<BaseSubobject, uint64_t> &
159 return SecondaryVirtualPointerIndices;
165 #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