diff options
Diffstat (limited to 'include/llvm/ADT/DenseMap.h')
-rw-r--r-- | include/llvm/ADT/DenseMap.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 8b62f2d..8b161ea 100644 --- 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) { |