blob: d36dfec5f25ad0243af0afebc1a052cd9e548d4d [file] [log] [blame]
Zachary Turner7120a472016-06-06 20:37:05 +00001//===- 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
20namespace llvm {
21namespace pdb {
22class YAMLOutputStyle : public OutputStyle {
23public:
24 YAMLOutputStyle(PDBFile &File);
25
Zachary Turnera30bd1a2016-06-30 17:42:48 +000026 Error dump() override;
Zachary Turner7120a472016-06-06 20:37:05 +000027
28private:
Zachary Turnera30bd1a2016-06-30 17:42:48 +000029 Error dumpFileHeaders();
30 Error dumpStreamMetadata();
31 Error dumpStreamDirectory();
Zachary Turner8848a7a2016-07-06 18:05:57 +000032 Error dumpPDBStream();
Zachary Turnerdbeaea72016-07-11 21:45:26 +000033 Error dumpDbiStream();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000034
35 void flush();
36
Zachary Turner7120a472016-06-06 20:37:05 +000037 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