blob: f5740ec458e2a9f41cba4dc15561182dbdd4c0f7 [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
15#include "llvm/DebugInfo/CodeView/TypeDumper.h"
16#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();
34 Error dumpStreamBytes();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000035 Error dumpStreamBlocks();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000036 Error dumpInfoStream();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000037 Error dumpTpiStream(uint32_t StreamIdx);
38 Error dumpDbiStream();
39 Error dumpSectionContribs();
40 Error dumpSectionMap();
41 Error dumpPublicsStream();
42 Error dumpSectionHeaders();
43 Error dumpFpoStream();
44
Zachary Turnerd3c7b8e2016-08-01 21:19:45 +000045 void dumpBitVector(StringRef Name, const BitVector &V);
46
Zachary Turnera30bd1a2016-06-30 17:42:48 +000047 void flush();
48
Zachary Turnerd3117392016-06-03 19:28:33 +000049 PDBFile &File;
50 ScopedPrinter P;
Zachary Turner5e3e4bb2016-08-05 21:45:34 +000051 codeview::CVTypeDumper Dumper;
Zachary Turner36efbfa2016-09-09 19:00:49 +000052 std::vector<std::string> StreamPurposes;
Zachary Turnerd3117392016-06-03 19:28:33 +000053};
54}
55}
56
57#endif