blob: 7dfb74c4e14b4ac9ddb263f962ed77c1f9317ba9 [file] [log] [blame]
Zachary Turner9e7dda32017-04-12 23:18:51 +00001//===- 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//===----------------------------------------------------------------------===//
9
10#ifndef LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
11#define LLVM_TOOLS_LLVMPDBDUMP_PRETTYCLASSLAYOUTGRAPHICALDUMPER_H
12
13#include "llvm/ADT/BitVector.h"
14
15#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
16
17namespace llvm {
18
19namespace pdb {
20
Zachary Turner4dc4f012017-04-13 21:11:00 +000021class UDTLayoutBase;
22class StorageItemBase;
Zachary Turner9e7dda32017-04-12 23:18:51 +000023class LinePrinter;
24
25class PrettyClassLayoutGraphicalDumper : public PDBSymDumper {
26public:
Zachary Turner4dc4f012017-04-13 21:11:00 +000027 PrettyClassLayoutGraphicalDumper(LinePrinter &P, uint32_t InitialOffset);
Zachary Turner9e7dda32017-04-12 23:18:51 +000028
Zachary Turner4dc4f012017-04-13 21:11:00 +000029 bool start(const UDTLayoutBase &Layout);
Zachary Turner9e7dda32017-04-12 23:18:51 +000030
31 void dump(const PDBSymbolTypeBaseClass &Symbol) override;
32 void dump(const PDBSymbolData &Symbol) override;
Zachary Turner9e7dda32017-04-12 23:18:51 +000033 void dump(const PDBSymbolTypeVTable &Symbol) override;
Zachary Turner4dc4f012017-04-13 21:11:00 +000034
35private:
36 void printPaddingRow(uint32_t Amount);
37
38 LinePrinter &Printer;
39
40 StorageItemBase *CurrentItem = nullptr;
41 uint32_t ClassOffsetZero = 0;
42 uint32_t CurrentAbsoluteOffset = 0;
43 bool DumpedAnything = false;
Zachary Turner9e7dda32017-04-12 23:18:51 +000044};
45}
46}
47#endif