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