OSDN Git Service

Pass a filename instead of a msf::WritableStream to PDBFileBuilder::commit.
authorRui Ueyama <ruiu@google.com>
Fri, 30 Sep 2016 20:34:44 +0000 (20:34 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 30 Sep 2016 20:34:44 +0000 (20:34 +0000)
commit9d24c090351e6d2268d3f7bd435b1aaed6bc30bf
tree2a1cd457c8afd110603cb751219a86b69c34b72e
parente68f1f14f3e9c30a567745f528e6e39f1a9700e5
Pass a filename instead of a msf::WritableStream to PDBFileBuilder::commit.

WritableStream needs the exact file size to open a file, but
until we fix the final layout of a PDB file, we don't know the
size of the file.

This patch changes the parameter type of PDBFileBuilder::commit
to solve that chiecken-and-egg problem. Now the function opens
a file after fixing the layout, so it can create a file with the
exact size.

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

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