1 //===- PrettyClassLayoutGraphicalDumper.h -----------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
10 #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
12 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
22 class PrettyClassLayoutGraphicalDumper
: public PDBSymDumper
{
24 PrettyClassLayoutGraphicalDumper(LinePrinter
&P
, uint32_t RecurseLevel
,
25 uint32_t InitialOffset
);
27 bool start(const UDTLayoutBase
&Layout
);
29 // Layout based symbol types.
30 void dump(const PDBSymbolTypeBaseClass
&Symbol
) override
;
31 void dump(const PDBSymbolData
&Symbol
) override
;
32 void dump(const PDBSymbolTypeVTable
&Symbol
) override
;
34 // Non layout-based symbol types.
35 void dump(const PDBSymbolTypeEnum
&Symbol
) override
;
36 void dump(const PDBSymbolFunc
&Symbol
) override
;
37 void dump(const PDBSymbolTypeTypedef
&Symbol
) override
;
38 void dump(const PDBSymbolTypeUDT
&Symbol
) override
;
39 void dump(const PDBSymbolTypeBuiltin
&Symbol
) override
;
42 bool shouldRecurse() const;
43 void printPaddingRow(uint32_t Amount
);
47 LayoutItemBase
*CurrentItem
= nullptr;
48 uint32_t RecursionLevel
= 0;
49 uint32_t ClassOffsetZero
= 0;
50 uint32_t CurrentAbsoluteOffset
= 0;
51 bool DumpedAnything
= false;