[llvm-commits] [llvm] r165073 - in /llvm/trunk: include/llvm/ADT/SetVector.h lib/Transforms/Scalar/SROA.cpp

Chandler Carruth chandlerc at gmail.com
Tue Oct 2 18:06:23 PDT 2012


On Tue, Oct 2, 2012 at 5:48 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:

>
> On Oct 2, 2012, at 5:43 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> > I can go back to my original idea for solving this: make a predicate
> that calls the set_.erase(). I think that's slightly better than open
> coding any of these loops.... It's just a wrapper predicate.
>
> I find an explicit loop orders of magnitude easier to read than template
> hacks, but that's just me.
>

I do tend to agree. As it happens, the wrapper here requires very little
template stuff, it's just a wrapper struct instead of a wrapper lambda
which would be the cleanest solution. I've tried this out in r165076. If it
doesn't scan easily just let me know and I'll happily switch it to a loop.
=]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121002/15972e54/attachment.html>


More information about the llvm-commits mailing list