]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and update
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / llvm-pdbdump / YAMLOutputStyle.h
1 //===- YAMLOutputStyle.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_YAMLOUTPUTSTYLE_H
11 #define LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H
12
13 #include "OutputStyle.h"
14 #include "PdbYaml.h"
15
16 #include "llvm/DebugInfo/CodeView/CVTypeDumper.h"
17 #include "llvm/Support/ScopedPrinter.h"
18 #include "llvm/Support/YAMLTraits.h"
19
20 namespace llvm {
21 namespace pdb {
22 class ModStream;
23
24 class YAMLOutputStyle : public OutputStyle {
25 public:
26   YAMLOutputStyle(PDBFile &File);
27
28   Error dump() override;
29
30 private:
31   Expected<Optional<llvm::pdb::yaml::PdbSourceFileInfo>>
32   getFileLineInfo(const pdb::ModStream &ModS);
33
34   Error dumpStringTable();
35   Error dumpFileHeaders();
36   Error dumpStreamMetadata();
37   Error dumpStreamDirectory();
38   Error dumpPDBStream();
39   Error dumpDbiStream();
40   Error dumpTpiStream();
41   Error dumpIpiStream();
42
43   void flush();
44
45   PDBFile &File;
46   llvm::yaml::Output Out;
47
48   yaml::PdbObject Obj;
49 };
50 } // namespace pdb
51 } // namespace llvm
52
53 #endif // LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H