[llvm-objcopy] [COFF] Fix warnings abuilt missing field initialization. NFC.
[llvm-complete.git] / tools / llvm-pdbutil / PrettyClassLayoutGraphicalDumper.h
blobf83f1a6c1b34fae6ce7e17633e98c725ee0f103a
1 //===- PrettyClassLayoutGraphicalDumper.h -----------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
11 #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
13 #include "llvm/ADT/BitVector.h"
15 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
17 namespace llvm {
19 namespace pdb {
21 class UDTLayoutBase;
22 class LayoutItemBase;
23 class LinePrinter;
25 class PrettyClassLayoutGraphicalDumper : public PDBSymDumper {
26 public:
27 PrettyClassLayoutGraphicalDumper(LinePrinter &P, uint32_t RecurseLevel,
28 uint32_t InitialOffset);
30 bool start(const UDTLayoutBase &Layout);
32 // Layout based symbol types.
33 void dump(const PDBSymbolTypeBaseClass &Symbol) override;
34 void dump(const PDBSymbolData &Symbol) override;
35 void dump(const PDBSymbolTypeVTable &Symbol) override;
37 // Non layout-based symbol types.
38 void dump(const PDBSymbolTypeEnum &Symbol) override;
39 void dump(const PDBSymbolFunc &Symbol) override;
40 void dump(const PDBSymbolTypeTypedef &Symbol) override;
41 void dump(const PDBSymbolTypeUDT &Symbol) override;
42 void dump(const PDBSymbolTypeBuiltin &Symbol) override;
44 private:
45 bool shouldRecurse() const;
46 void printPaddingRow(uint32_t Amount);
48 LinePrinter &Printer;
50 LayoutItemBase *CurrentItem = nullptr;
51 uint32_t RecursionLevel = 0;
52 uint32_t ClassOffsetZero = 0;
53 uint32_t CurrentAbsoluteOffset = 0;
54 bool DumpedAnything = false;
58 #endif