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