diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/DenseMap.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index fe91240..4338249 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -203,7 +203,9 @@ private: else for (size_t i = 0; i < other.NumBuckets; ++i) { new (Buckets[i].first) KeyT(other.Buckets[i].first); - new (Buckets[i].second) ValueT(other.Buckets[i].second); + if (Buckets[i].first != getEmptyKey() && + Buckets[i].first != getTombstoneKey()) + new (Buckets[i].second) ValueT(other.Buckets[i].second); } NumBuckets = other.NumBuckets; } |