blob: a623dde2c498dee3ab942376ac08c78f7cbd52c1 [file] [log] [blame]
Zachary Turner7120a472016-06-06 20:37:05 +00001//===- 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
21namespace llvm {
22namespace pdb {
23class PDBFile;
24
25namespace yaml {
26struct 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
39struct PdbObject {
40 Optional<MsfHeaders> Headers;
41};
42}
43}
44
45namespace yaml {
46template <> struct MappingTraits<pdb::yaml::MsfHeaders> {
47 static void mapping(IO &IO, pdb::yaml::MsfHeaders &Obj);
48};
49template <> struct MappingTraits<pdb::yaml::PdbObject> {
50 static void mapping(IO &IO, pdb::yaml::PdbObject &Obj);
51};
52}
53}
54
55LLVM_YAML_IS_SEQUENCE_VECTOR(uint32_t)
56
57#endif // LLVM_TOOLS_LLVMPDBDUMP_PDBYAML_H