llvm.org GIT mirror llvm / 3640f26
Add front() method to SetVector. Differential Revision: https://reviews.llvm.org/D27262 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297398 91177308-0d34-0410-b5e6-96231b3b80d8 Jan Sjodin 3 years ago
1 changed file(s) with 6 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
118118 return vector_.rend();
119119 }
120120
121 /// \brief Return the first element of the SetVector.
122 const T &front() const {
123 assert(!empty() && "Cannot call front() on empty SetVector!");
124 return vector_.front();
125 }
126
121127 /// \brief Return the last element of the SetVector.
122128 const T &back() const {
123129 assert(!empty() && "Cannot call back() on empty SetVector!");