[Lldb-commits] [PATCH] EmulationStateARM: Don't have >= comparisons against dwarf_r0

Zachary Turner zturner at google.com
Wed Jul 30 13:43:42 PDT 2014


Could probably address that concern with a comment, but the alternatives
(disabling the warning or doing a cast to a signed type) both seem strictly
worse than removing the code, and I'm a strong proponent of warning-free
code across all platforms.


On Wed, Jul 30, 2014 at 1:39 PM, Todd Fiala <tfiala at google.com> wrote:

> I dunno - this is encoding some logic that makes sure the reg number is
> between r0 and cpsr.  The fact that r0 happens to be zero is convenient in
> this case, but taking that out is taking out some documentation of what the
> code is really doing.
>
> In general I'm not a fan of removing semantic information that is
> meaningful to humans even if the compiler can optimize it to a simpler
> expression.  If this code were ever copied for another architecture where
> the equivalent of r0 was a different number, or if the reg_num was turned
> to a typedef and that changed to, say, an int, we've not only lost semantic
> info but also real logic.
>
> That's my 2 cents.
>
> -Todd
>
> http://reviews.llvm.org/D4629
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140730/2c04c28a/attachment.html>


More information about the lldb-commits mailing list