Add a new (simple) StringMap::clear method, patch by Pratik
[oota-llvm.git] / include / llvm / ADT / DenseMap.h
index b29c69156277cc0ea5a52702430d837d37761d65..2caec63ee4126b5465171f0f35a90e4b5f3b9775 100644 (file)
@@ -218,7 +218,7 @@ private:
       memcpy(Buckets, other.Buckets, other.NumBuckets * sizeof(BucketT));
     else
       for (size_t i = 0; i < other.NumBuckets; ++i) {
-        new (Buckets[i].first) KeyT(other.Buckets[i].first);
+        new (&Buckets[i].first) KeyT(other.Buckets[i].first);
         if (!KeyInfoT::isEqual(Buckets[i].first, getEmptyKey()) &&
             !KeyInfoT::isEqual(Buckets[i].first, getTombstoneKey()))
           new (&Buckets[i].second) ValueT(other.Buckets[i].second);