Add llvm::Triple class for abstracting access to target triples.
[oota-llvm.git] / lib / Support / SmallPtrSet.cpp
index 7aad3eeec7ad9e9dcdadb45e8554c8d0ff463901..68938fa5a5716849ce499d1b56c7ef0d4fc4da04 100644 (file)
@@ -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<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;
 }