forked from OSchip/llvm-project
Fix use of placement new to actually use an address.
llvm-svn: 52423
This commit is contained in:
parent
5696e7badf
commit
edcfe385fe
|
@ -218,7 +218,7 @@ private:
|
||||||
memcpy(Buckets, other.Buckets, other.NumBuckets * sizeof(BucketT));
|
memcpy(Buckets, other.Buckets, other.NumBuckets * sizeof(BucketT));
|
||||||
else
|
else
|
||||||
for (size_t i = 0; i < other.NumBuckets; ++i) {
|
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()) &&
|
if (!KeyInfoT::isEqual(Buckets[i].first, getEmptyKey()) &&
|
||||||
!KeyInfoT::isEqual(Buckets[i].first, getTombstoneKey()))
|
!KeyInfoT::isEqual(Buckets[i].first, getTombstoneKey()))
|
||||||
new (&Buckets[i].second) ValueT(other.Buckets[i].second);
|
new (&Buckets[i].second) ValueT(other.Buckets[i].second);
|
||||||
|
|
Loading…
Reference in New Issue