1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Add front() method to SetVector.

Differential Revision: https://reviews.llvm.org/D27262

llvm-svn: 297398
This commit is contained in:
Jan Sjodin 2017-03-09 18:25:07 +00:00
parent 9ae008d11e
commit f699e1cb43

View File

@ -119,6 +119,12 @@ public:
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!");