blob: 7a50af1abe3f55fa23ae05240f2cf8ab13f5d9f6 [file] [log] [blame]
Zachary Turner7120a472016-06-06 20:37:05 +00001//===- YAMLOutputStyle.h -------------------------------------- *- C++ --*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Zachary Turner7120a472016-06-06 20:37:05 +00006//
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
Zachary Turner7120a472016-06-06 20:37:05 +000015#include "llvm/Support/ScopedPrinter.h"
16#include "llvm/Support/YAMLTraits.h"
17
18namespace llvm {
19namespace pdb {
Zachary Turner7cc13e52017-05-01 16:46:39 +000020class ModuleDebugStreamRef;
Zachary Turneree3b9c22017-04-25 20:22:02 +000021
Zachary Turner7120a472016-06-06 20:37:05 +000022class 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 Turner760ad4d2017-01-20 22:42:09 +000029 Error dumpStringTable();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000030 Error dumpFileHeaders();
31 Error dumpStreamMetadata();
32 Error dumpStreamDirectory();
Zachary Turner8848a7a2016-07-06 18:05:57 +000033 Error dumpPDBStream();
Zachary Turnerdbeaea72016-07-11 21:45:26 +000034 Error dumpDbiStream();
Zachary Turnerac5763e2016-08-18 16:49:29 +000035 Error dumpTpiStream();
Zachary Turnerde9ba152016-09-15 18:22:31 +000036 Error dumpIpiStream();
Zachary Turnered2597e2018-10-26 00:17:31 +000037 Error dumpPublics();
Zachary Turnera30bd1a2016-06-30 17:42:48 +000038
39 void flush();
40
Zachary Turner7120a472016-06-06 20:37:05 +000041 PDBFile &File;
42 llvm::yaml::Output Out;
43
44 yaml::PdbObject Obj;
45};
46} // namespace pdb
47} // namespace llvm
48
49#endif // LLVM_TOOLS_LLVMPDBDUMP_YAMLOUTPUTSTYLE_H