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 6using namespace llvm; 7using namespace llvm::pdb; 8 9// Create a pointer record for a non-simple type. 10NativeTypeVTShape::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 16NativeTypeVTShape::~NativeTypeVTShape() = default; 17 18void 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 32bool NativeTypeVTShape::isConstType() const { return false; } 33 34bool NativeTypeVTShape::isVolatileType() const { return false; } 35 36bool NativeTypeVTShape::isUnalignedType() const { return false; } 37 38uint32_t NativeTypeVTShape::getCount() const { return Record.Slots.size(); } 39