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.
NativeTypeVTShape(NativeSession & Session,SymIndexId Id,codeview::TypeIndex TI,codeview::VFTableShapeRecord SR)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
dump(raw_ostream & OS,int Indent,PdbSymbolIdField ShowIdFields,PdbSymbolIdField RecurseIdFields) const17 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
isConstType() const31 bool NativeTypeVTShape::isConstType() const { return false; }
32
isVolatileType() const33 bool NativeTypeVTShape::isVolatileType() const { return false; }
34
isUnalignedType() const35 bool NativeTypeVTShape::isUnalignedType() const { return false; }
36
getCount() const37 uint32_t NativeTypeVTShape::getCount() const { return Record.Slots.size(); }
38