/// \brief Return the attributes at the given slot.
AttributeSet getSlotAttributes(unsigned Slot) const;
- /// \brief Return the AttributeWithIndex at the specified slot. This holds a
- /// index number plus a set of attributes.
- const AttributeWithIndex &getSlot(unsigned Slot) const;
-
void dump() const;
};
return AttrList->getSlotAttributes(Slot);
}
-/// getSlot - Return the AttributeWithIndex at the specified slot. This
-/// holds a number plus a set of attributes.
-const AttributeWithIndex &AttributeSet::getSlot(unsigned Slot) const {
- assert(AttrList && Slot < AttrList->getNumAttributes() &&
- "Slot # out of range!");
- return AttrList->getAttributes()[Slot];
-}
-
bool AttributeSet::hasAttribute(unsigned Index, Attribute::AttrKind Kind) const{
return getAttributes(Index).hasAttribute(Kind);
}