From 0cb74d3d8e7b76fb0c9fb585c9ebb7814ba1b9eb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Dec 2008 06:08:04 +0000 Subject: [PATCH] add densemap range insertion method. llvm-svn: 60400 --- include/llvm/ADT/DenseMap.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index c2093d607c4..4b815f69783 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -213,6 +213,14 @@ public: true); } + /// insert - Range insertion of pairs. + template + void insert(InputIt I, InputIt E) { + for (; I != E; ++I) + insert(*I); + } + + bool erase(const KeyT &Val) { BucketT *TheBucket; if (!LookupBucketFor(Val, TheBucket))