[llvm] r200331 - Add BumpPtrAllocator::allocateCopy() utilities
Nick Kledzik
kledzik at apple.com
Wed Feb 5 14:30:23 PST 2014
On Feb 4, 2014, at 1:21 PM, Eli Bendersky <eliben at google.com> wrote:
>
>
>
> On Tue, Feb 4, 2014 at 11:32 AM, Nick Kledzik <kledzik at apple.com> wrote:
>
> On Feb 1, 2014, at 9:41 AM, Eli Bendersky <eliben at google.com> wrote:
>> It strikes me as strange to add a dependency for Allocator on StringRef for this case (and I guess on ArrayRef too). If this is a service StringRef needs from Allocator and not vice versa, wouldn't it make more sense to add this utility method to StringRef (taking an Allocator)?
>
> Ok, I’ve inverted the layering with this patch. Allocator.h goes back to what it was and I’ve added a copy(BumpPtrAllocator &) method to StringRef and ArrayRef<>. And the test cases move out of the allocator and into StringRef and ArrayRef.
>
>
>
>
> Great. Thanks, Nick.
Committed in r200885.
-Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140205/9806a2bf/attachment.html>
More information about the llvm-commits
mailing list