1#include "llvm/DebugInfo/PDB/Native/NativeTypeVTShape.h"
2#include "llvm/DebugInfo/PDB/Native/NativeSession.h"
3#include "llvm/DebugInfo/PDB/PDBExtras.h"
4
5using namespace llvm;
6using namespace llvm::pdb;
7
8// Create a pointer record for a non-simple type.
9NativeTypeVTShape::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
15NativeTypeVTShape::~NativeTypeVTShape() = default;
16
17void 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, Name: "lexicalParentId", Value: 0, Indent, Session,
23 FieldId: PdbSymbolIdField::LexicalParent, ShowFlags: ShowIdFields,
24 RecurseFlags: RecurseIdFields);
25 dumpSymbolField(OS, Name: "count", Value: getCount(), Indent);
26 dumpSymbolField(OS, Name: "constType", Value: isConstType(), Indent);
27 dumpSymbolField(OS, Name: "unalignedType", Value: isUnalignedType(), Indent);
28 dumpSymbolField(OS, Name: "volatileType", Value: isVolatileType(), Indent);
29}
30
31bool NativeTypeVTShape::isConstType() const { return false; }
32
33bool NativeTypeVTShape::isVolatileType() const { return false; }
34
35bool NativeTypeVTShape::isUnalignedType() const { return false; }
36
37uint32_t NativeTypeVTShape::getCount() const { return Record.Slots.size(); }
38