aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/SmallPtrSet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/SmallPtrSet.cpp')
-rw-r--r--lib/Support/SmallPtrSet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp
index 4cbf2cd9e2..68938fa5a5 100644
--- a/lib/Support/SmallPtrSet.cpp
+++ b/lib/Support/SmallPtrSet.cpp
@@ -58,13 +58,13 @@ bool SmallPtrSetImpl::insert_imp(const void * Ptr) {
Grow();
// Okay, we know we have space. Find a hash bucket.
- void **Bucket = const_cast<void**>(FindBucketFor((void*)Ptr));
+ const void **Bucket = const_cast<const void**>(FindBucketFor(Ptr));
if (*Bucket == Ptr) return false; // Already inserted, good.
// Otherwise, insert it!
if (*Bucket == getTombstoneMarker())
--NumTombstones;
- *Bucket = (void*)Ptr;
+ *Bucket = Ptr;
++NumElements; // Track density.
return true;
}