diff options
author | Zachary Turner <zturner@google.com> | 2017-02-27 22:11:43 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-02-27 22:11:43 +0000 |
commit | 120faca41bddd3a5922bdefbeb7c68908fda9ab9 (patch) | |
tree | e3c36b67c61a5021ed8847241cfaf9c59b48309a /llvm/lib/DebugInfo/PDB/Native/HashTable.cpp | |
parent | 4a7cc16e89b68d48335e7cd19837c3e67e12afb2 (diff) | |
download | llvm-120faca41bddd3a5922bdefbeb7c68908fda9ab9.zip llvm-120faca41bddd3a5922bdefbeb7c68908fda9ab9.tar.gz llvm-120faca41bddd3a5922bdefbeb7c68908fda9ab9.tar.bz2 |
[PDB] Partial resubmit of r296215, which improved PDB Stream Library.
This was reverted because it was breaking some builds, and
because of incorrect error code usage. Since the CL was
large and contained many different things, I'm resubmitting
it in pieces.
This portion is NFC, and consists of:
1) Renaming classes to follow a consistent naming convention.
2) Fixing the const-ness of the interface methods.
3) Adding detailed doxygen comments.
4) Fixing a few instances of passing `const BinaryStream& X`. These
are now passed as `BinaryStreamRef X`.
llvm-svn: 296394
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/HashTable.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/HashTable.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp b/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp index dd95c07..5357997 100644 --- a/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp @@ -22,7 +22,7 @@ HashTable::HashTable() : HashTable(8) {} HashTable::HashTable(uint32_t Capacity) { Buckets.resize(Capacity); } -Error HashTable::load(msf::StreamReader &Stream) { +Error HashTable::load(BinaryStreamReader &Stream) { const Header *H; if (auto EC = Stream.readObject(H)) return EC; @@ -77,7 +77,7 @@ uint32_t HashTable::calculateSerializedLength() const { return Size; } -Error HashTable::commit(msf::StreamWriter &Writer) const { +Error HashTable::commit(BinaryStreamWriter &Writer) const { Header H; H.Size = size(); H.Capacity = capacity(); @@ -209,7 +209,7 @@ void HashTable::grow() { assert(size() == S); } -Error HashTable::readSparseBitVector(msf::StreamReader &Stream, +Error HashTable::readSparseBitVector(BinaryStreamReader &Stream, SparseBitVector<> &V) { uint32_t NumWords; if (auto EC = Stream.readInteger(NumWords, llvm::support::little)) @@ -231,7 +231,7 @@ Error HashTable::readSparseBitVector(msf::StreamReader &Stream, return Error::success(); } -Error HashTable::writeSparseBitVector(msf::StreamWriter &Writer, +Error HashTable::writeSparseBitVector(BinaryStreamWriter &Writer, SparseBitVector<> &Vec) { int ReqBits = Vec.find_last() + 1; uint32_t NumWords = alignTo(ReqBits, sizeof(uint32_t)) / sizeof(uint32_t); |