[lldb-dev] LLDB Evolution

Chris Lattner via lldb-dev lldb-dev at lists.llvm.org
Sat Aug 27 09:24:55 PDT 2016


> On Aug 26, 2016, at 6:12 PM, Zachary Turner via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> Back to the formatting issue, there's a lot of code that's going to look bad after the reformat, because we have some DEEPLY indented code.  LLVM has adopted the early return model for this reason.  A huge amount of our deeply nested code could be solved by using early returns. 

FWIW, early returns are part of the LLVM Coding standard:
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code <http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code>

So it makes sense for LLDB to adopt this approach at some point.

I don’t have an opinion about whether it happens before or after the "big reformat", but I guess I agree with your point that doing it would be good to do it for the most egregious cases before the reformat.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160827/e6a03ca3/attachment.html>


More information about the lldb-dev mailing list