mirror of
https://github.com/intel/llvm.git
synced 2026-01-28 01:04:49 +08:00
add a helper ctor.
llvm-svn: 91819
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user