llvm/tools/llvm-pdbdump/PdbYaml.cpp
Zachary Turner bf3c011ba7 Revert "[pdb] Actually write a PDB to disk from YAML."
This reverts commit 879139e1c6577b09df52de56a6bab856a19ed185.

This was committed accidentally when I blindly typed git svn
dcommit instead of the command to generate a patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-14 18:51:35 +00:00

45 lines
1.5 KiB
C++

//===- PdbYAML.cpp -------------------------------------------- *- C++ --*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "PdbYaml.h"
#include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
using namespace llvm;
using namespace llvm::yaml;
using namespace llvm::pdb;
using namespace llvm::pdb::yaml;
void MappingTraits<MsfHeaders>::mapping(IO &IO, MsfHeaders &Obj) {
IO.mapRequired("BlockSize", Obj.BlockSize);
IO.mapRequired("Unknown0", Obj.Unknown0);
IO.mapRequired("NumBlocks", Obj.BlockCount);
IO.mapRequired("NumDirectoryBytes", Obj.NumDirectoryBytes);
IO.mapRequired("Unknown1", Obj.Unknown1);
IO.mapRequired("BlockMapAddr", Obj.BlockMapIndex);
IO.mapRequired("NumDirectoryBlocks", Obj.NumDirectoryBlocks);
IO.mapRequired("BlockMapOffset", Obj.BlockMapOffset);
IO.mapRequired("DirectoryBlocks", Obj.DirectoryBlocks);
IO.mapRequired("NumStreams", Obj.NumStreams);
}
void MappingTraits<PdbObject>::mapping(IO &IO, PdbObject &Obj) {
IO.mapOptional("MSF", Obj.Headers);
IO.mapOptional("StreamSizes", Obj.StreamSizes);
IO.mapOptional("StreamMap", Obj.StreamMap);
}
void MappingTraits<StreamSizeEntry>::mapping(IO &IO, StreamSizeEntry &Obj) {
IO.mapRequired("Size", Obj.Size);
}
void MappingTraits<StreamMapEntry>::mapping(IO &IO, StreamMapEntry &Obj) {
IO.mapRequired("Blocks", Obj.Blocks);
}