blob: 4aef78d3253f8725c83d80d108510d40c8638154 [file] [log] [blame]
Zachary Turnerd3117392016-06-03 19:28:33 +00001//===- LLVMOutputStyle.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_LLVMOUTPUTSTYLE_H
11#define LLVM_TOOLS_LLVMPDBDUMP_LLVMOUTPUTSTYLE_H
12
13#include "OutputStyle.h"
14
Zachary Turner629cb7d2017-01-11 23:24:22 +000015#include "llvm/DebugInfo/CodeView/TypeDatabase.h"
Zachary Turnerd3117392016-06-03 19:28:33 +000016#include "llvm/Support/ScopedPrinter.h"
17
18namespace llvm {
Zachary Turnerd3c7b8e2016-08-01 21:19:45 +000019class BitVector;
Zachary Turnerd3117392016-06-03 19:28:33 +000020namespace pdb {
21class LLVMOutputStyle : public OutputStyle {
22public:
23 LLVMOutputStyle(PDBFile &File);
24
Zachary Turnera30bd1a2016-06-30 17:42:48 +000025 Error dump() override;
Zachary Turner7120a472016-06-06 20:37:05 +000026
Zachary Turnerd3117392016-06-03 19:28:33 +000027private:
Zachary Turner36efbfa2016-09-09 19:00:49 +000028 void discoverStreamPurposes();
29
Zachary Turnera30bd1a2016-06-30 17:42:48 +000030 Error dumpFileHeaders();
31 Error dumpStreamSummary();
Rui Ueyama7a5cdc62016-07-29 21:38:00 +000032 Error dumpFreePageMap();
Zachary Turner72c5b642016-09-09 18:17:52 +000033 Error dumpBlockRanges();
Bob Haarman653baa22016-10-21 19:43:19 +000034 Error dumpGlobalsStream();
Zachary Turner72c5b642016-09-09 18:17:52 +000035 Error dumpStreamBytes();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000036 Error dumpStreamBlocks();
Zachary Turner760ad4d2017-01-20 22:42:09 +000037 Error dumpStringTable();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000038 Error dumpInfoStream();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000039 Error dumpTpiStream(uint32_t StreamIdx);
40 Error dumpDbiStream();
41 Error dumpSectionContribs();
42 Error dumpSectionMap();
43 Error dumpPublicsStream();
44 Error dumpSectionHeaders();
45 Error dumpFpoStream();
46
Zachary Turnerd3c7b8e2016-08-01 21:19:45 +000047 void dumpBitVector(StringRef Name, const BitVector &V);
48
Zachary Turnera30bd1a2016-06-30 17:42:48 +000049 void flush();
50
Zachary Turnerd3117392016-06-03 19:28:33 +000051 PDBFile &File;
52 ScopedPrinter P;
Zachary Turner629cb7d2017-01-11 23:24:22 +000053 codeview::TypeDatabase TypeDB;
Zachary Turner36efbfa2016-09-09 19:00:49 +000054 std::vector<std::string> StreamPurposes;
Zachary Turnerd3117392016-06-03 19:28:33 +000055};
56}
57}
58
59#endif