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

Pete Cooper peter_cooper at apple.com
Wed May 13 15:31:38 PDT 2015


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 --------------
A non-text attachment was scrubbed...
Name: arrayref.diff
Type: application/octet-stream
Size: 2581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150513/3ea858a6/attachment.obj>


More information about the llvm-commits mailing list