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