Have DenseSet::insert return a bool indicating whether the insertion succeeded or...
authorOwen Anderson <resistor@mac.com>
Wed, 2 Jul 2008 17:29:59 +0000 (17:29 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 2 Jul 2008 17:29:59 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53033 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/DenseSet.h

index f1510a9a20399aafa70643353a16878f95e2e43e..06d0fa8e0d649018ebc35ea6189614b88bfe5b0a 100644 (file)
@@ -41,8 +41,8 @@ public:
     return TheMap.count(V);
   }
   
-  void insert(const ValueT &V) {
-    TheMap[V] = 0;
+  bool insert(const ValueT &V) {
+    return TheMap.insert(std::make_pair(V, 0));
   }
   
   void erase(const ValueT &V) {