aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-12-20 00:03:41 +0000
committerChris Lattner <sabre@nondot.org>2011-12-20 00:03:41 +0000
commitf5c9bd07bca0a14afc37b7c28409736e001de96d (patch)
treecf9c1af713b5acaada0a6e66930b1f2eff534ede
parente3376ecd504300ae529c902135f51baffbdc2824 (diff)
downloadexternal_llvm-f5c9bd07bca0a14afc37b7c28409736e001de96d.tar.gz
external_llvm-f5c9bd07bca0a14afc37b7c28409736e001de96d.tar.bz2
external_llvm-f5c9bd07bca0a14afc37b7c28409736e001de96d.zip
add a method to improve compatibility with SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146928 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/SetVector.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h
index abe20676d5..965f0deaca 100644
--- a/include/llvm/ADT/SetVector.h
+++ b/include/llvm/ADT/SetVector.h
@@ -144,6 +144,12 @@ public:
set_.erase(back());
vector_.pop_back();
}
+
+ T pop_back_val() {
+ T Ret = back();
+ pop_back();
+ return Ret;
+ }
bool operator==(const SetVector &that) const {
return vector_ == that.vector_;