[PATCH] Add support for unroll pragma

Richard Smith richard at metafoo.co.uk
Thu Jul 17 11:32:16 PDT 2014


On 17 Jul 2014 11:13, "Mark Heffernan" <meheff at google.com> wrote:
>
> On Wed, Jul 16, 2014 at 4:57 PM, Richard Smith <richard at metafoo.co.uk>
wrote:
>>
>> How about modeling the two options as either an IntegerLiteral or an
IntegerLiteral within a ParenExpr?
>
>
> Assuming I understand what you're suggesting, using a parenexpr would
clean up the passing of the loophint information from parsing to sema.
 However, there would still be the ugliness of tracking the parens
everywhere else, such as in the loop hint attr.  This tracking would be for
the sole purpose of pretty printing the same syntax as the code.  From what
Eli and Aaron have suggested about pretty printing, it seems that a better
tradeoff is to just drop keeping track of parentheses and always pretty
print with parens as this results in a cleaner implementation.  Reasonable?

LoopHintAttr should track an Expr*, in order to provide source fidelity and
to support arbitrary constant expressions and template instantiation.
Keeping parens there should then not require any extra effort - but I think
this is fairly low-value so I'm happy either way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140717/28c04ea7/attachment.html>


More information about the cfe-commits mailing list