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:
d5b1f8a
)
add a helper ctor.
author
Chris Lattner
<sabre@nondot.org>
Mon, 21 Dec 2009 07:15:15 +0000
(07:15 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 21 Dec 2009 07:15:15 +0000
(07:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91819
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 8b62f2d8c811aeb4c9881b086dcb070244911cc9..8b161eae73fb596faeb2d272b494d86fc424bdb8 100644
(file)
--- a/
include/llvm/ADT/DenseMap.h
+++ b/
include/llvm/ADT/DenseMap.h
@@
-46,7
+46,7
@@
public:
typedef ValueT mapped_type;
typedef BucketT value_type;
- DenseMap(const DenseMap
&
other) {
+ DenseMap(const DenseMap
&
other) {
NumBuckets = 0;
CopyFrom(other);
}
@@
-55,6
+55,12
@@
public:
init(NumInitBuckets);
}
+ template<typename InputIt>
+ DenseMap(const InputIt &I, const InputIt &E) {
+ init(64);
+ insert(I, E);
+ }
+
~DenseMap() {
const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey();
for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) {