[PATCH] D27262: Add front() method to SetVector.
Jan Sjödin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 10:37:07 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297398: Add front() method to SetVector. (authored by jsjodin).
Changed prior to commit:
https://reviews.llvm.org/D27262?vs=79764&id=91191#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27262
Files:
llvm/trunk/include/llvm/ADT/SetVector.h
Index: llvm/trunk/include/llvm/ADT/SetVector.h
===================================================================
--- llvm/trunk/include/llvm/ADT/SetVector.h
+++ llvm/trunk/include/llvm/ADT/SetVector.h
@@ -119,6 +119,12 @@
return vector_.rend();
}
+ /// \brief Return the first element of the SetVector.
+ const T &front() const {
+ assert(!empty() && "Cannot call front() on empty SetVector!");
+ return vector_.front();
+ }
+
/// \brief Return the last element of the SetVector.
const T &back() const {
assert(!empty() && "Cannot call back() on empty SetVector!");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27262.91191.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170309/8149aee9/attachment.bin>
More information about the llvm-commits
mailing list