/// availability attribute.
unsigned IsAvailability : 1;
+ unsigned AttrKind : 8;
+
/// \brief The location of the 'unavailable' keyword in an
/// availability attribute.
SourceLocation UnavailableLoc;
DeclspecAttribute(declspec), CXX0XAttribute(cxx0x), Invalid(false),
IsAvailability(false), NextInPosition(0), NextInPool(0) {
if (numArgs) memcpy(getArgsBuffer(), args, numArgs * sizeof(Expr*));
+ AttrKind = getKind(getName());
}
AttributeList(IdentifierInfo *attrName, SourceLocation attrLoc,
new (&getAvailabilitySlot(IntroducedSlot)) AvailabilityChange(introduced);
new (&getAvailabilitySlot(DeprecatedSlot)) AvailabilityChange(deprecated);
new (&getAvailabilitySlot(ObsoletedSlot)) AvailabilityChange(obsoleted);
+ AttrKind = getKind(getName());
}
friend class AttributePool;
bool isInvalid() const { return Invalid; }
void setInvalid(bool b = true) const { Invalid = b; }
- Kind getKind() const { return getKind(getName()); }
+ Kind getKind() const { return Kind(AttrKind); }
static Kind getKind(const IdentifierInfo *Name);
AttributeList *getNext() const { return NextInPosition; }