From f5c9bd07bca0a14afc37b7c28409736e001de96d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 20 Dec 2011 00:03:41 +0000 Subject: [PATCH] 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 --- include/llvm/ADT/SetVector.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/ADT/SetVector.h b/include/llvm/ADT/SetVector.h index abe20676d54..965f0deacaa 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_;