summaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-07-02 17:29:59 +0000
committerOwen Anderson <resistor@mac.com>2008-07-02 17:29:59 +0000
commit93ee2fd7da6100eafcc510cfdeb71f2bfdd15429 (patch)
tree36f26208408dcd978c7773c91a278dca5fd57f25 /include/llvm/ADT
parentf2aa160b357c98d8c37b69ea9775aa3e097d1319 (diff)
downloadexternal_llvm-93ee2fd7da6100eafcc510cfdeb71f2bfdd15429.zip
external_llvm-93ee2fd7da6100eafcc510cfdeb71f2bfdd15429.tar.gz
external_llvm-93ee2fd7da6100eafcc510cfdeb71f2bfdd15429.tar.bz2
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
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/DenseSet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/DenseSet.h b/include/llvm/ADT/DenseSet.h
index f1510a9..06d0fa8 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) {