[llvm-commits] [llvm] r146928 - /llvm/trunk/include/llvm/ADT/SetVector.h
Chris Lattner
sabre at nondot.org
Mon Dec 19 16:03:41 PST 2011
Author: lattner
Date: Mon Dec 19 18:03:41 2011
New Revision: 146928
URL: http://llvm.org/viewvc/llvm-project?rev=146928&view=rev
Log:
add a method to improve compatibility with SmallVector.
Modified:
llvm/trunk/include/llvm/ADT/SetVector.h
Modified: llvm/trunk/include/llvm/ADT/SetVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SetVector.h?rev=146928&r1=146927&r2=146928&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SetVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SetVector.h Mon Dec 19 18:03:41 2011
@@ -144,6 +144,12 @@
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_;
More information about the llvm-commits
mailing list