[llvm-commits] [dragonegg] r165706 - /dragonegg/trunk/src/TypeConversion.cpp
Duncan Sands
baldrick at free.fr
Thu Oct 11 09:55:49 PDT 2012
Hi Bill,
> One more syntax fix to get buildbots working.
thanks for all the fixes! Sorry for not helping out: I was kind of busy with
other things.
Some comments on the changes:
- RAttributes |= Attribute::InReg; \
+ RAttributes |= Attributes(Attributes::InReg); \
If I'm understanding right this constructor
explicit Attributes(uint64_t Val);
is going to go away at some point, because people constructing attributes will
have to provide a context.
- PAL = PAL.addAttr(~0, Attribute::NoUnwind);
+ Attributes::Builder B;
+ B.addAttribute(Attributes::NoUnwind);
+ PAL = PAL.addAttr(~0, Attributes::get(B));
This seems kind of convoluted. Presumably PAL (of type AttrListPtr) could know
the context already, in which case couldn't addAttr have a version that
understands this construct:
PAL = PAL.addAttr(~0, Attributes::NoUnwind);
?
This
- if (!PAL.paramHasAttr(~0, Attribute::NoUnwind)) {
+ if (!PAL.getFnAttributes().hasAttribute(Attributes::NoUnwind)) {
is kind of heavy, how about adding hasFnAttribute so you can write
if (!PAL.hasFnAttribute(Attributes::NoUnwind)) {
?
Here's something else which is very heavy:
- return Attribute::ZExt;
+ return Attributes::get(Attributes::Builder().addAttribute(Attributes::ZExt));
Could this be:
return Attributes(Context, Attributes::ZExt);
instead?
Ciao, Duncan.
More information about the llvm-commits
mailing list