diff options
| author | Zachary Turner <zturner@google.com> | 2017-01-20 22:41:40 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-01-20 22:41:40 +0000 |
| commit | 60667ca0b2b95ee25dace3f8627feda5a904cd8f (patch) | |
| tree | 7ae0305c1b0d65822ea70a49204ed35020c79092 /llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp | |
| parent | f04d6e8d52719d64dddd95e86577d61ad1f4f074 (diff) | |
| download | bcm5719-llvm-60667ca0b2b95ee25dace3f8627feda5a904cd8f.tar.gz bcm5719-llvm-60667ca0b2b95ee25dace3f8627feda5a904cd8f.zip | |
[pdb] Merge NamedStreamMapBuilder and NamedStreamMap.
While the builder pattern has proven useful for certain other
larger types, in this case it was hampering the ability to use
the data structure, as for runtime access we need a map that
we can efficiently read from and write to. So the two are merged
into a single data structure that can efficiently be read to,
written from, deserialized from bytes, and serialized to bytes.
llvm-svn: 292664
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp b/llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp index b218f3d8f38..aadc13e53a5 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/HashTable.cpp @@ -99,6 +99,12 @@ Error HashTable::commit(msf::StreamWriter &Writer) const { return Error::success(); } +void HashTable::clear() { + Buckets.resize(8); + Present.clear(); + Deleted.clear(); +} + uint32_t HashTable::capacity() const { return Buckets.size(); } uint32_t HashTable::size() const { return Present.count(); } |

