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, Name: "lexicalParentId", Value: 0, Indent, Session,
24 FieldId: PdbSymbolIdField::LexicalParent, ShowFlags: ShowIdFields,
25 RecurseFlags: RecurseIdFields);
26 dumpSymbolField(OS, Name: "count", Value: getCount(), Indent);
27 dumpSymbolField(OS, Name: "constType", Value: isConstType(), Indent);
28 dumpSymbolField(OS, Name: "unalignedType", Value: isUnalignedType(), Indent);
29 dumpSymbolField(OS, Name: "volatileType", Value: 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

source code of llvm/lib/DebugInfo/PDB/Native/NativeTypeVTShape.cpp