Fix several const-correctness issues, resolving some -Wcast-qual warnings.

llvm-svn: 54349
diff --git a/llvm/lib/Support/SmallPtrSet.cpp b/llvm/lib/Support/SmallPtrSet.cpp
index 4cbf2cd..68938fa 100644
--- a/llvm/lib/Support/SmallPtrSet.cpp
+++ b/llvm/lib/Support/SmallPtrSet.cpp
@@ -58,13 +58,13 @@
     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;
 }