blob: 09f1314932ad6efc79a1c660015a63ff02ce42c0 [file] [log] [blame]
Zachary Turner29c69102015-02-23 05:58:34 +00001//===- VariableDumper.h - PDBSymDumper implementation for types -*- 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_VARIABLEDUMPER_H
11#define LLVM_TOOLS_LLVMPDBDUMP_VARIABLEDUMPER_H
12
13#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
14#include "llvm/ADT/StringRef.h"
15
16namespace llvm {
17
Zachary Turner2d11c202015-02-27 09:15:59 +000018class LinePrinter;
19
Zachary Turner29c69102015-02-23 05:58:34 +000020class VariableDumper : public PDBSymDumper {
21public:
Zachary Turner2d11c202015-02-27 09:15:59 +000022 VariableDumper(LinePrinter &P);
Zachary Turner29c69102015-02-23 05:58:34 +000023
24 void start(const PDBSymbolData &Var, raw_ostream &OS, int Indent);
25
26 void dump(const PDBSymbolTypeBuiltin &Symbol, raw_ostream &OS,
27 int Indent) override;
28 void dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS,
29 int Indent) override;
30 void dump(const PDBSymbolTypeFunctionSig &Symbol, raw_ostream &OS,
31 int Indent) override;
32 void dump(const PDBSymbolTypePointer &Symbol, raw_ostream &OS,
33 int Indent) override;
34 void dump(const PDBSymbolTypeTypedef &Symbol, raw_ostream &OS,
35 int Indent) override;
36 void dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS,
37 int Indent) override;
38
39private:
40 void dumpSymbolTypeAndName(const PDBSymbol &Type, StringRef Name,
41 raw_ostream &OS);
Zachary Turnerd270d222015-02-26 23:49:23 +000042 bool tryDumpFunctionPointer(const PDBSymbol &Type, StringRef Name,
43 raw_ostream &OS);
Zachary Turner2d11c202015-02-27 09:15:59 +000044
45 LinePrinter &Printer;
Zachary Turner29c69102015-02-23 05:58:34 +000046};
47}
48
49#endif