diff options
author | Owen Anderson <resistor@mac.com> | 2007-09-11 04:43:51 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-09-11 04:43:51 +0000 |
commit | 98153ecbc1b29c576ff43a7718c3f657f81b8aac (patch) | |
tree | 551a925fe3ea02c4107a6804899ffc218f5973a5 /include/llvm | |
parent | 0a890e2fb524124ecb9b0899e4daacd32bf9a44b (diff) | |
download | external_llvm-98153ecbc1b29c576ff43a7718c3f657f81b8aac.zip external_llvm-98153ecbc1b29c576ff43a7718c3f657f81b8aac.tar.gz external_llvm-98153ecbc1b29c576ff43a7718c3f657f81b8aac.tar.bz2 |
Don't bother to initialize values corresponding to empty or tombstone
keys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-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; } |