[cfe-dev] Patch: Implement break and continue

Chris Lattner clattner at apple.com
Mon Jul 16 14:30:35 PDT 2007


>> 1. Instead of having separate break/continue stacks, I'd suggest  
>> merging them and using a SmallVector<std::pair> (or a custom  
>> struct instead of a pair if you prefer).  For switch stmts (when  
>> we support them), we'd just use null as the continue point.
>>
>
> Thanks for the comments! Here's a new patch that addresses all of  
> them and adds an extra assert that the break/continue stack is  
> empty after generating the function body.
>
> <break-continue-in-loops-2.txt>
>

Applied, thanks!

For future reference, I did forgot to mention one thing: please keep  
the code within 80 columns.  I took care of the two long lines in  
this patch so it's not a big deal.

Thanks again for the contribution!

-Chris



More information about the cfe-dev mailing list