From: Owen Anderson Date: Wed, 2 Jul 2008 17:29:59 +0000 (+0000) Subject: Have DenseSet::insert return a bool indicating whether the insertion succeeded or... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=93ee2fd7da6100eafcc510cfdeb71f2bfdd15429;p=oota-llvm.git Have DenseSet::insert return a bool indicating whether the insertion succeeded or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53033 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h index f1510a9a203..06d0fa8e0d6 100644 --- a/include/llvm/ADT/DenseSet.h +++ b/include/llvm/ADT/DenseSet.h @@ -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) {