OSDN Git Service

Do not pass a superblock to PDBFileBuilder.
authorRui Ueyama <ruiu@google.com>
Fri, 30 Sep 2016 20:52:12 +0000 (20:52 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 30 Sep 2016 20:52:12 +0000 (20:52 +0000)
commit3f7d1658c90577bb62019eec9792e00c56380c29
treecda6e6d31c5ce30b55effe29fc88174bd4b2254e
parent9d24c090351e6d2268d3f7bd435b1aaed6bc30bf
Do not pass a superblock to PDBFileBuilder.

When we create a PDB file using PDBFileBuilder, the information
in the superblock, such as the size of the resulting file, is not
available.

Previously, PDBFileBuilder::initialize took a superblock assuming
that all the members of the struct are correct. That is useful when
you want to restore the exact information from a YAML file, but
that's probably the only use case in which that is useful.
When we are creating a PDB file on the fly, we have to backfill the
members.

This patch redefines PDBFileBuilder::initialize to take only a
block size. Now all the other members are left as default values,
so that they'll be updated when commit() is called.

Differential Revision: https://reviews.llvm.org/D25108

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282944 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/MSF/MSFBuilder.h
include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h
lib/DebugInfo/MSF/MSFBuilder.cpp
lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp
test/DebugInfo/PDB/pdbdump-readwrite.test
tools/llvm-pdbdump/llvm-pdbdump.cpp