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

Pete Cooper peter_cooper at apple.com
Wed May 13 15:46:55 PDT 2015


Thanks for the quick review!  r237309.

Pete
> On May 13, 2015, at 3:38 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 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 <mailto: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 <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/cee4d070/attachment.html>


More information about the llvm-commits mailing list