From 2b7470eb54880ce7f74469d6e09eaf7f0864f8ab Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 17 Jun 2008 18:07:43 +0000 Subject: [PATCH] Fix use of placement new to actually use an address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52423 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/DenseMap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index b29c6915627..2caec63ee41 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -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); -- 2.34.1