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 18 namespace llvm { 19 namespace pdb { 20 class ModuleDebugStreamRef; 21 22 class YAMLOutputStyle : public OutputStyle { 23 public: 24 YAMLOutputStyle(PDBFile &File); 25 26 Error dump() override; 27 28 private: 29 Error dumpStringTable(); 30 Error dumpFileHeaders(); 31 Error dumpStreamMetadata(); 32 Error dumpStreamDirectory(); 33 Error dumpPDBStream(); 34 Error dumpDbiStream(); 35 Error dumpTpiStream(); 36 Error dumpIpiStream(); 37 Error dumpPublics(); 38 39 void flush(); 40 41 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 50