projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a890e2
)
Don't bother to initialize values corresponding to empty or tombstone
author
Owen Anderson
<resistor@mac.com>
Tue, 11 Sep 2007 04:43:51 +0000
(
04:43
+0000)
committer
Owen Anderson
<resistor@mac.com>
Tue, 11 Sep 2007 04:43:51 +0000
(
04:43
+0000)
keys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41834
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/DenseMap.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/DenseMap.h
b/include/llvm/ADT/DenseMap.h
index fe912404cd9a43cdc4bda366589ea02b426ec6b4..43382492856cbfe471d62db431454a256d292727 100644
(file)
--- 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;
}