[llvm-commits] [llvm] r53033 - /llvm/trunk/include/llvm/ADT/DenseSet.h

Owen Anderson resistor at mac.com
Wed Jul 2 10:30:14 PDT 2008


Author: resistor
Date: Wed Jul  2 12:29:59 2008
New Revision: 53033

URL: http://llvm.org/viewvc/llvm-project?rev=53033&view=rev
Log:
Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.

Modified:
    llvm/trunk/include/llvm/ADT/DenseSet.h

Modified: llvm/trunk/include/llvm/ADT/DenseSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=53033&r1=53032&r2=53033&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseSet.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseSet.h Wed Jul  2 12:29:59 2008
@@ -41,8 +41,8 @@
     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) {





More information about the llvm-commits mailing list