diff options
Diffstat (limited to 'contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h')
-rw-r--r-- | contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h b/contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h index 0831f47557ed..0e27733b3ccb 100644 --- a/contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h +++ b/contrib/llvm/tools/llvm-pdbdump/PrettyClassDefinitionDumper.h @@ -10,6 +10,8 @@ #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSDEFINITIONDUMPER_H #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSDEFINITIONDUMPER_H +#include "llvm/ADT/BitVector.h" + #include "llvm/DebugInfo/PDB/PDBSymDumper.h" #include "llvm/DebugInfo/PDB/PDBSymbolData.h" #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" @@ -19,44 +21,26 @@ #include <unordered_map> namespace llvm { +class BitVector; + namespace pdb { +class ClassLayout; class LinePrinter; class ClassDefinitionDumper : public PDBSymDumper { public: ClassDefinitionDumper(LinePrinter &P); - void start(const PDBSymbolTypeUDT &Exe); - - void dump(const PDBSymbolTypeBaseClass &Symbol) override; - void dump(const PDBSymbolData &Symbol) override; - void dump(const PDBSymbolTypeEnum &Symbol) override; - void dump(const PDBSymbolFunc &Symbol) override; - void dump(const PDBSymbolTypeTypedef &Symbol) override; - void dump(const PDBSymbolTypeUDT &Symbol) override; - void dump(const PDBSymbolTypeVTable &Symbol) override; + void start(const PDBSymbolTypeUDT &Class); + void start(const ClassLayout &Class); private: - LinePrinter &Printer; + void prettyPrintClassIntro(const ClassLayout &Class); + void prettyPrintClassOutro(const ClassLayout &Class); - struct SymbolGroup { - SymbolGroup() {} - SymbolGroup(SymbolGroup &&Other) { - Functions = std::move(Other.Functions); - Data = std::move(Other.Data); - Unknown = std::move(Other.Unknown); - } - - std::list<std::unique_ptr<PDBSymbolFunc>> Functions; - std::list<std::unique_ptr<PDBSymbolData>> Data; - std::list<std::unique_ptr<PDBSymbol>> Unknown; - SymbolGroup(const SymbolGroup &other) = delete; - SymbolGroup &operator=(const SymbolGroup &other) = delete; - }; - typedef std::unordered_map<int, SymbolGroup> SymbolGroupByAccess; - - int dumpAccessGroup(PDB_MemberAccess Access, const SymbolGroup &Group); + bool DumpedAnything = false; + LinePrinter &Printer; }; } } |