X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FSmallPtrSet.cpp;h=68938fa5a5716849ce499d1b56c7ef0d4fc4da04;hb=23e97b05da7b31ed97e5ccc6330670da0173ca2e;hp=7aad3eeec7ad9e9dcdadb45e8554c8d0ff463901;hpb=373a733be031f52cebbbcdb15ab5997d9b5f9f17;p=oota-llvm.git diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp index 7aad3eeec7a..68938fa5a57 100644 --- a/lib/Support/SmallPtrSet.cpp +++ b/lib/Support/SmallPtrSet.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Chris Lattner and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -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(FindBucketFor((void*)Ptr)); + const void **Bucket = const_cast(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; }