diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-06-30 23:06:03 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-06-30 23:06:03 +0000 |
commit | 4fcfc19976c9abfb98008f67c973b99376580121 (patch) | |
tree | cfe96f93a661180764a7b0b658bbe6b277aefe7d /llvm/lib/DebugInfo/PDB/Native/HashTable.cpp | |
parent | 0c3d76179c78d455ad8855cdc0745ee6e1199a90 (diff) | |
download | llvm-4fcfc19976c9abfb98008f67c973b99376580121.zip llvm-4fcfc19976c9abfb98008f67c973b99376580121.tar.gz llvm-4fcfc19976c9abfb98008f67c973b99376580121.tar.bz2 |
[CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 306911
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/HashTable.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/HashTable.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp b/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp index ebf8c9c..439217f 100644 --- a/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/HashTable.cpp @@ -1,4 +1,4 @@ -//===- HashTable.cpp - PDB Hash Table ---------------------------*- C++ -*-===// +//===- HashTable.cpp - PDB Hash Table -------------------------------------===// // // The LLVM Compiler Infrastructure // @@ -8,12 +8,16 @@ //===----------------------------------------------------------------------===// #include "llvm/DebugInfo/PDB/Native/HashTable.h" - #include "llvm/ADT/Optional.h" -#include "llvm/ADT/SparseBitVector.h" #include "llvm/DebugInfo/PDB/Native/RawError.h" - -#include <assert.h> +#include "llvm/Support/BinaryStreamReader.h" +#include "llvm/Support/BinaryStreamWriter.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/MathExtras.h" +#include <algorithm> +#include <cassert> +#include <cstdint> +#include <utility> using namespace llvm; using namespace llvm::pdb; @@ -106,9 +110,11 @@ void HashTable::clear() { } uint32_t HashTable::capacity() const { return Buckets.size(); } + uint32_t HashTable::size() const { return Present.count(); } HashTableIterator HashTable::begin() const { return HashTableIterator(*this); } + HashTableIterator HashTable::end() const { return HashTableIterator(*this, 0, true); } |