[llvm-commits] Case Ranges. New, fresh 'switch' prototype is here! Default case went away.

Chris Lattner clattner at apple.com
Mon Oct 29 22:21:30 PDT 2012


On Oct 29, 2012, at 8:27 AM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote:

> Hi all!
> Please find new prototype in attachment. Hope for your reviews.
> Thanks!

I like it without default cases!  Some thoughts:

1. IRBuilder.CreateSwitch should take an ArrayRef, not a SmallVector by value.  It needs to work too :)
2. Please (as a separate patch) move the bulk of CaseIteratorT out of line into a .cpp file.  I'm not sure how the best way to do this is, maybe using a pImpl or similar trick.
3. You've got some funky indentation going on (some places using 4 spaces).

Otherwise, the approach is looking fairly reasonable.

-Chris



More information about the llvm-commits mailing list