Fix test failures introduced by PR #113697 (#116941)
[llvm-project.git] / llvm / tools / llvm-pdbutil / PrettyClassLayoutGraphicalDumper.h
blobf7ef3c65a3f1888917b473604714f00cbe023d87
1 //===- PrettyClassLayoutGraphicalDumper.h -----------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
10 #define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
12 #include "llvm/DebugInfo/PDB/PDBSymDumper.h"
14 namespace llvm {
16 namespace pdb {
18 class UDTLayoutBase;
19 class LayoutItemBase;
20 class LinePrinter;
22 class PrettyClassLayoutGraphicalDumper : public PDBSymDumper {
23 public:
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;
41 private:
42 bool shouldRecurse() const;
43 void printPaddingRow(uint32_t Amount);
45 LinePrinter &Printer;
47 LayoutItemBase *CurrentItem = nullptr;
48 uint32_t RecursionLevel = 0;
49 uint32_t ClassOffsetZero = 0;
50 uint32_t CurrentAbsoluteOffset = 0;
51 bool DumpedAnything = false;
55 #endif