r175100 - objective-C: Make order of ivars which are synthesized

John McCall rjmccall at apple.com
Wed Feb 13 15:31:58 PST 2013


On Feb 13, 2013, at 3:24 PM, Ted Kremenek <kremenek at apple.com> wrote:
> On Feb 13, 2013, at 3:21 PM, jahanian <fjahanian at apple.com> wrote:
>>> How about using source order, since type size isn't going to give a total order?
>> 
>> Hmm. I need both. ivars of same type size need be grouped together in their source order.
>> - Fariborz
> 
> A custom comparison should be able to do both.  Sort by type size, then by source order.

A more efficient way to do this is to build them up in an array as you process the properties and then stable_sort that by type size.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130213/255038d9/attachment.html>


More information about the cfe-commits mailing list