]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / llvm-pdbdump / LLVMOutputStyle.h
1 //===- 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/ADT/SmallVector.h"
16 #include "llvm/DebugInfo/CodeView/TypeDatabase.h"
17 #include "llvm/Support/ScopedPrinter.h"
18
19 #include <string>
20
21 namespace llvm {
22 class BitVector;
23 namespace pdb {
24 class LLVMOutputStyle : public OutputStyle {
25 public:
26   LLVMOutputStyle(PDBFile &File);
27
28   Error dump() override;
29
30 private:
31   Error dumpFileHeaders();
32   Error dumpStreamSummary();
33   Error dumpFreePageMap();
34   Error dumpBlockRanges();
35   Error dumpGlobalsStream();
36   Error dumpStreamBytes();
37   Error dumpStreamBlocks();
38   Error dumpStringTable();
39   Error dumpInfoStream();
40   Error dumpTpiStream(uint32_t StreamIdx);
41   Error dumpDbiStream();
42   Error dumpSectionContribs();
43   Error dumpSectionMap();
44   Error dumpPublicsStream();
45   Error dumpSectionHeaders();
46   Error dumpFpoStream();
47
48   void dumpBitVector(StringRef Name, const BitVector &V);
49
50   void flush();
51
52   PDBFile &File;
53   ScopedPrinter P;
54   codeview::TypeDatabase TypeDB;
55   codeview::TypeDatabase ItemDB;
56   SmallVector<std::string, 32> StreamPurposes;
57 };
58 }
59 }
60
61 #endif