blob: a5ad3355d2ab4d8b7996ba0bd5f9c23693ea72c2 [file] [log] [blame]
Zachary Turner61e0e272016-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
Zachary Turner61e0e272016-06-06 20:37:05 +000016#include "llvm/Support/ScopedPrinter.h"
17#include "llvm/Support/YAMLTraits.h"
18
19namespace llvm {
20namespace pdb {
Zachary Turner3b718702017-05-01 16:46:39 +000021class ModuleDebugStreamRef;
Zachary Turnera3ca9302017-04-25 20:22:02 +000022
Zachary Turner61e0e272016-06-06 20:37:05 +000023class YAMLOutputStyle : public OutputStyle {
24public:
25 YAMLOutputStyle(PDBFile &File);
26
Zachary Turner3a4681d2016-06-30 17:42:48 +000027 Error dump() override;
Zachary Turner61e0e272016-06-06 20:37:05 +000028
29private:
Zachary Turner9c1e7a62017-01-20 22:42:09 +000030 Error dumpStringTable();
Zachary Turner3a4681d2016-06-30 17:42:48 +000031 Error dumpFileHeaders();
32 Error dumpStreamMetadata();
33 Error dumpStreamDirectory();
Zachary Turner8bf0aed2016-07-06 18:05:57 +000034 Error dumpPDBStream();
Zachary Turnerae108ee2016-07-11 21:45:26 +000035 Error dumpDbiStream();
Zachary Turner3fe902e2016-08-18 16:49:29 +000036 Error dumpTpiStream();
Zachary Turner5fa3c522016-09-15 18:22:31 +000037 Error dumpIpiStream();
Zachary Turnerf3aabb02018-10-26 00:17:31 +000038 Error dumpPublics();
Zachary Turner3a4681d2016-06-30 17:42:48 +000039
40 void flush();
41
Zachary Turner61e0e272016-06-06 20:37:05 +000042 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