blob: 5e30959ea9c0d45f58d3a4a079a3fca1e059cc24 [file] [log] [blame]
Zachary Turner63055452017-06-15 22:24:24 +00001//===- MinimalSymbolDumper.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_LLVMPDBUTIL_MINIMAL_SYMBOL_DUMPER_H
11#define LLVM_TOOLS_LLVMPDBUTIL_MINIMAL_SYMBOL_DUMPER_H
12
13#include "llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h"
14
15namespace llvm {
16namespace codeview {
17class LazyRandomTypeCollection;
18}
19
20namespace pdb {
21class LinePrinter;
22
23class MinimalSymbolDumper : public codeview::SymbolVisitorCallbacks {
24public:
25 MinimalSymbolDumper(LinePrinter &P, bool RecordBytes,
26 codeview::LazyRandomTypeCollection &Types)
27 : P(P), Types(Types) {}
28
29 Error visitSymbolBegin(codeview::CVSymbol &Record) override;
Zachary Turneraf8c75a2017-06-30 21:35:00 +000030 Error visitSymbolBegin(codeview::CVSymbol &Record, uint32_t Offset) override;
Zachary Turner63055452017-06-15 22:24:24 +000031 Error visitSymbolEnd(codeview::CVSymbol &Record) override;
32
33#define SYMBOL_RECORD(EnumName, EnumVal, Name) \
34 virtual Error visitKnownRecord(codeview::CVSymbol &CVR, \
35 codeview::Name &Record) override;
36#define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
37#include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
38
39private:
40 std::string typeIndex(codeview::TypeIndex TI) const;
41
42 LinePrinter &P;
43 codeview::LazyRandomTypeCollection &Types;
44};
45} // namespace pdb
46} // namespace llvm
47
48#endif