[PATCH] D27262: Add front() method to SetVector.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 09:33:20 PDT 2017


Ping - seems it's still lacking test coverage.

On Thu, Mar 9, 2017 at 10:37 AM Jan Sjödin via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> wrote:

> 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!");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170313/2ded8a52/attachment.html>


More information about the llvm-commits mailing list