From faa554b2fd6c327cb9cc0ac9983bd3c178f2276c Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 15 Jul 2016 22:16:56 +0000 Subject: [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 --- llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp') diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp index e2f85ab880f..c33a764587c 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 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 +} -- cgit v1.2.3