diff options
author | Zachary Turner <zturner@google.com> | 2016-07-28 19:12:28 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-07-28 19:12:28 +0000 |
commit | d66889cbae749ceffca88f094274e2d64c2cb8f8 (patch) | |
tree | 81e34f9af216751ced0d50609d558d2f15277b46 /llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | |
parent | 199f48a5f0d5aee8737880a78d81216d60cf785d (diff) | |
download | llvm-d66889cbae749ceffca88f094274e2d64c2cb8f8.zip llvm-d66889cbae749ceffca88f094274e2d64c2cb8f8.tar.gz llvm-d66889cbae749ceffca88f094274e2d64c2cb8f8.tar.bz2 |
[pdb] Refactor library to more clearly separate reading/writing
Reviewed By: amccarth, ruiu
Differential Revision: https://reviews.llvm.org/D22693
llvm-svn: 277019
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp index c55f51d..4df24f2 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/InfoStream.cpp @@ -15,6 +15,7 @@ #include "llvm/DebugInfo/PDB/Raw/PDBFile.h" #include "llvm/DebugInfo/PDB/Raw/RawConstants.h" #include "llvm/DebugInfo/PDB/Raw/RawError.h" +#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" using namespace llvm; using namespace llvm::codeview; @@ -27,7 +28,7 @@ InfoStream::InfoStream(std::unique_ptr<MappedBlockStream> Stream) Error InfoStream::reload() { StreamReader Reader(*Stream); - const HeaderInfo *H; + const InfoStreamHeader *H; if (auto EC = Reader.readObject(H)) return joinErrors( std::move(EC), @@ -74,17 +75,3 @@ uint32_t InfoStream::getSignature() const { return Signature; } uint32_t InfoStream::getAge() const { return Age; } PDB_UniqueId InfoStream::getGuid() const { return Guid; } - -Error InfoStream::commit() { - StreamWriter Writer(*Stream); - - HeaderInfo H; - H.Age = Age; - H.Signature = Signature; - H.Version = Version; - H.Guid = Guid; - if (auto EC = Writer.writeObject(H)) - return EC; - - return NamedStreams.commit(Writer); -} |