On Wed, May 2, 2018 at 4:56 PM, Davide Italiano <dccitali...@gmail.com> wrote:
> On Wed, May 2, 2018 at 4:51 PM, Jason Molenda via lldb-commits
> <lldb-commits@lists.llvm.org> wrote:
>> Is this really simpler?  We could write it
>>
>> if (name == g_zero)
>>   return 0;
>> else
>>   return UINT32_MAX;
>>
>> or we could do it that way, or it could be done the way it was originally 
>> written.
>>
>> tbh it seems like a style choice, and whoever wrote it originally may have 
>> preferred it being expressed that way.  I can understand that you prefer it 
>> be expressed this way - but it's not actually any better or more readable, 
>> is it?  Certainly the compiler is going to turn any variation we can come up 
>> with into the same instructions.
>>
>
> Oh, I guess I should've said "make this code shorter" or something :)
> We end up preferring ternary in llvm whenever possible, and I just
> followed what was used there.
> I largely agree it's a stylistic choice, FWIW.
>

Also, I don't necessarily mind reverting this, as long as we agree on
a style to follow.

Thanks for your comments!

--
Davide
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to