[PATCH] Construct ArrayRef<const T*> from vector<T>

David Blaikie dblaikie at gmail.com
Wed May 13 15:38:39 PDT 2015


Looks like exactly the same SFINAE as the existing ArrayRef->ArrayRef case,
so it sounds good to me.

Thanks!

- Dave

On Wed, May 13, 2015 at 3:31 PM, Pete Cooper <peter_cooper at apple.com> wrote:

> Hi David
>
> This was on the discussion of r237226 (
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150511/276285.html
> ).
>
> This patch allows construction of ArrayRef<const T*> from SmallVector<T*>
> and std::vector<T*>.  This avoids having to use an intermediate call to
> makeArrayRef which is the current method to achieve this.
>
> I’ve used this to update the calls in LICM and SROA which had been changed
> to use makeArrayRef in r237226.
>
> Comments welcome.
>
> Cheers,
> Pete
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150513/e18f3487/attachment.html>


More information about the llvm-commits mailing list