1//===- YAMLOutputStyle.h -------------------------------------- *- C++ --*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H
10#define LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H
11
12#include "OutputStyle.h"
13#include "PdbYaml.h"
14
15#include "llvm/Support/ScopedPrinter.h"
16#include "llvm/Support/YAMLTraits.h"
17
18namespace llvm {
19namespace pdb {
20
21class YAMLOutputStyle : public OutputStyle {
22public:
23 YAMLOutputStyle(PDBFile &File);
24
25 Error dump() override;
26
27private:
28 Error dumpStringTable();
29 Error dumpFileHeaders();
30 Error dumpStreamMetadata();
31 Error dumpStreamDirectory();
32 Error dumpPDBStream();
33 Error dumpDbiStream();
34 Error dumpTpiStream();
35 Error dumpIpiStream();
36 Error dumpPublics();
37
38 void flush();
39
40 PDBFile &File;
41 llvm::yaml::Output Out;
42
43 yaml::PdbObject Obj;
44};
45} // namespace pdb
46} // namespace llvm
47
48#endif // LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H
49