1 //===- ClassDefinitionDumper.h - --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TOOLS_LLVMPDBDUMP_CLASSDEFINITIONDUMPER_H
11 #define LLVM_TOOLS_LLVMPDBDUMP_CLASSDEFINITIONDUMPER_H
13 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
14 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h"
15 #include "llvm/DebugInfo/PDB/PDBSymbolData.h"
19 #include <unordered_map>
25 class ClassDefinitionDumper : public PDBSymDumper {
27 ClassDefinitionDumper(LinePrinter &P);
29 void start(const PDBSymbolTypeUDT &Exe, raw_ostream &OS, int Indent);
31 void dump(const PDBSymbolTypeBaseClass &Symbol, raw_ostream &OS,
33 void dump(const PDBSymbolData &Symbol, raw_ostream &OS, int Indent) override;
34 void dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS,
36 void dump(const PDBSymbolFunc &Symbol, raw_ostream &OS, int Indent) override;
37 void dump(const PDBSymbolTypeTypedef &Symbol, raw_ostream &OS,
39 void dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS,
41 void dump(const PDBSymbolTypeVTable &Symbol, raw_ostream &OS,
49 SymbolGroup(SymbolGroup &&Other) {
50 Functions = std::move(Other.Functions);
51 Data = std::move(Other.Data);
52 Unknown = std::move(Other.Unknown);
55 std::list<std::unique_ptr<PDBSymbolFunc>> Functions;
56 std::list<std::unique_ptr<PDBSymbolData>> Data;
57 std::list<std::unique_ptr<PDBSymbol>> Unknown;
58 SymbolGroup(const SymbolGroup &other) = delete;
59 SymbolGroup &operator=(const SymbolGroup &other) = delete;
61 typedef std::unordered_map<int, SymbolGroup> SymbolGroupByAccess;
63 int dumpAccessGroup(PDB_MemberAccess Access, const SymbolGroup &Group,
64 raw_ostream &OS, int Indent);