1 #include "llvm/DebugInfo/PDB/Native/NativeTypeVTShape.h" 2 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" 3 #include "llvm/DebugInfo/PDB/Native/NativeSession.h" 4 #include "llvm/DebugInfo/PDB/PDBExtras.h" 5 6 using namespace llvm; 7 using namespace llvm::pdb; 8 9 // Create a pointer record for a non-simple type. 10 NativeTypeVTShape::NativeTypeVTShape(NativeSession &Session, SymIndexId Id, 11 codeview::TypeIndex TI, 12 codeview::VFTableShapeRecord SR) 13 : NativeRawSymbol(Session, PDB_SymType::VTableShape, Id), TI(TI), 14 Record(std::move(SR)) {} 15 16 NativeTypeVTShape::~NativeTypeVTShape() = default; 17 18 void NativeTypeVTShape::dump(raw_ostream &OS, int Indent, 19 PdbSymbolIdField ShowIdFields, 20 PdbSymbolIdField RecurseIdFields) const { 21 NativeRawSymbol::dump(OS, Indent, ShowIdFields, RecurseIdFields); 22 23 dumpSymbolIdField(OS, "lexicalParentId", 0, Indent, Session, 24 PdbSymbolIdField::LexicalParent, ShowIdFields, 25 RecurseIdFields); 26 dumpSymbolField(OS, "count", getCount(), Indent); 27 dumpSymbolField(OS, "constType", isConstType(), Indent); 28 dumpSymbolField(OS, "unalignedType", isUnalignedType(), Indent); 29 dumpSymbolField(OS, "volatileType", isVolatileType(), Indent); 30 } 31 32 bool NativeTypeVTShape::isConstType() const { return false; } 33 34 bool NativeTypeVTShape::isVolatileType() const { return false; } 35 36 bool NativeTypeVTShape::isUnalignedType() const { return false; } 37 38 uint32_t NativeTypeVTShape::getCount() const { return Record.Slots.size(); } 39