aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SmallPtrSet.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-08-23 17:14:32 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-08-23 17:14:32 +0000
commit33d7b762d009f52000984804bbbe01ab02b30f66 (patch)
treef05d418140464705a578cfa505447c15569edd03 /llvm/lib/Support/SmallPtrSet.cpp
parentada2bb3d5d61d541ba5156ae76576b9e5ef45383 (diff)
downloadllvm-33d7b762d009f52000984804bbbe01ab02b30f66.zip
llvm-33d7b762d009f52000984804bbbe01ab02b30f66.tar.gz
llvm-33d7b762d009f52000984804bbbe01ab02b30f66.tar.bz2
Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes.
Differential revision: https://reviews.llvm.org/D23789 llvm-svn: 279535
Diffstat (limited to 'llvm/lib/Support/SmallPtrSet.cpp')
-rw-r--r--llvm/lib/Support/SmallPtrSet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/SmallPtrSet.cpp b/llvm/lib/Support/SmallPtrSet.cpp
index 539b4eb..8fb12ba 100644
--- a/llvm/lib/Support/SmallPtrSet.cpp
+++ b/llvm/lib/Support/SmallPtrSet.cpp
@@ -16,6 +16,7 @@
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/Support/MathExtras.h"
#include <algorithm>
+#include <cassert>
#include <cstdlib>
using namespace llvm;
@@ -91,7 +92,7 @@ const void * const *SmallPtrSetImplBase::FindBucketFor(const void *Ptr) const {
unsigned ProbeAmt = 1;
const void *const *Array = CurArray;
const void *const *Tombstone = nullptr;
- while (1) {
+ while (true) {
// If we found an empty bucket, the pointer doesn't exist in the set.
// Return a tombstone if we've seen one so far, or the empty bucket if
// not.