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

Stepan Dyatkovskiy stpworld at narod.ru
Wed Oct 31 07:15:39 PDT 2012


Hi, Chris.

I also fixed IRBuilder and indentation.
Please find the patch in attachment.
Patch for #2 I sent yesterday separately, but I made the same changes 
for iterators, for prototype version too.

-Stepan.

Chris Lattner wrote:
>
> 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
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cr-refactor-2012-10-31-prototype.patch
Type: text/x-patch
Size: 51343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121031/404159ef/attachment.bin>


More information about the llvm-commits mailing list