diff options
author | Zachary Turner <zturner@google.com> | 2016-07-15 22:16:56 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-07-15 22:16:56 +0000 |
commit | faa554b2fd6c327cb9cc0ac9983bd3c178f2276c (patch) | |
tree | 7cb1be7bc7dfee1244fb8d6767036955aa276875 /llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | |
parent | 93be6e8c0ada7f77b93db16c81b2160f82780ae6 (diff) | |
download | llvm-faa554b2fd6c327cb9cc0ac9983bd3c178f2276c.zip llvm-faa554b2fd6c327cb9cc0ac9983bd3c178f2276c.tar.gz llvm-faa554b2fd6c327cb9cc0ac9983bd3c178f2276c.tar.bz2 |
[pdb] Use MsfBuilder to handle the writing PDBs.
Previously we would read a PDB, then write some of it back out,
but write the directory, super block, and other pertinent metadata
back out unchanged. This generates incorrect PDBs since the amount
of data written was not always the same as the amount of data read.
This patch changes things to use the newly introduced `MsfBuilder`
class to write out a correct and accurate set of Msf metadata for
the data *actually* written, which opens up the door for adding and
removing type records, symbol records, and other types of data to
an existing PDB.
llvm-svn: 275627
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp index e2f85ab..c33a764 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp @@ -27,7 +27,7 @@ InfoStream::InfoStream(std::unique_ptr<MappedBlockStream> Stream) Error InfoStream::reload() { codeview::StreamReader Reader(*Stream); - const Header *H; + const HeaderInfo *H; if (auto EC = Reader.readObject(H)) return joinErrors( std::move(EC), @@ -78,7 +78,7 @@ PDB_UniqueId InfoStream::getGuid() const { return Guid; } Error InfoStream::commit() { StreamWriter Writer(*Stream); - Header H; + HeaderInfo H; H.Age = Age; H.Signature = Signature; H.Version = Version; @@ -87,4 +87,4 @@ Error InfoStream::commit() { return EC; return NamedStreams.commit(Writer); -}
\ No newline at end of file +} |