Zachary Turner | 7120a47 | 2016-06-06 20:37:05 +0000 | [diff] [blame^] | 1 | //===- PdbYAML.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_PDBYAML_H |
| 11 | #define LLVM_TOOLS_LLVMPDBDUMP_PDBYAML_H |
| 12 | |
| 13 | #include "OutputStyle.h" |
| 14 | |
| 15 | #include "llvm/ADT/Optional.h" |
| 16 | #include "llvm/Support/Endian.h" |
| 17 | #include "llvm/Support/YAMLTraits.h" |
| 18 | |
| 19 | #include <vector> |
| 20 | |
| 21 | namespace llvm { |
| 22 | namespace pdb { |
| 23 | class PDBFile; |
| 24 | |
| 25 | namespace yaml { |
| 26 | struct MsfHeaders { |
| 27 | uint32_t BlockSize; |
| 28 | uint32_t Unknown0; |
| 29 | uint32_t BlockCount; |
| 30 | uint32_t NumDirectoryBytes; |
| 31 | uint32_t Unknown1; |
| 32 | uint32_t BlockMapIndex; |
| 33 | uint32_t NumDirectoryBlocks; |
| 34 | uint32_t BlockMapOffset; |
| 35 | std::vector<uint32_t> DirectoryBlocks; |
| 36 | uint32_t NumStreams; |
| 37 | }; |
| 38 | |
| 39 | struct PdbObject { |
| 40 | Optional<MsfHeaders> Headers; |
| 41 | }; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | namespace yaml { |
| 46 | template <> struct MappingTraits<pdb::yaml::MsfHeaders> { |
| 47 | static void mapping(IO &IO, pdb::yaml::MsfHeaders &Obj); |
| 48 | }; |
| 49 | template <> struct MappingTraits<pdb::yaml::PdbObject> { |
| 50 | static void mapping(IO &IO, pdb::yaml::PdbObject &Obj); |
| 51 | }; |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | LLVM_YAML_IS_SEQUENCE_VECTOR(uint32_t) |
| 56 | |
| 57 | #endif // LLVM_TOOLS_LLVMPDBDUMP_PDBYAML_H |