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/TypeDumper.h"
17 #include "llvm/Support/ScopedPrinter.h"
18 #include "llvm/Support/YAMLTraits.h"
19 
20 namespace llvm {
21 namespace pdb {
22 class YAMLOutputStyle : public OutputStyle {
23 public:
24   YAMLOutputStyle(PDBFile &File);
25 
26   Error dump() override;
27 
28 private:
29   Error dumpFileHeaders();
30   Error dumpStreamMetadata();
31   Error dumpStreamDirectory();
32   Error dumpPDBStream();
33   Error dumpDbiStream();
34 
35   void flush();
36 
37   PDBFile &File;
38   llvm::yaml::Output Out;
39 
40   yaml::PdbObject Obj;
41 };
42 } // namespace pdb
43 } // namespace llvm
44 
45 #endif // LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H
46