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