From 93ee2fd7da6100eafcc510cfdeb71f2bfdd15429 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 2 Jul 2008 17:29:59 +0000 Subject: [PATCH] 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 --- include/llvm/ADT/DenseSet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {