return pImpl && pImpl->hasAttribute(Kind);
}
-/// This returns the alignment field of an attribute as a byte alignment value.
unsigned Attribute::getAlignment() const {
assert(hasAttribute(Attribute::Alignment) &&
"Trying to get alignment from non-alignment attribute!");
return pImpl->getValueAsInt();
}
-/// This returns the stack alignment field of an attribute as a byte alignment
-/// value.
unsigned Attribute::getStackAlignment() const {
assert(hasAttribute(Attribute::StackAlignment) &&
"Trying to get alignment from non-alignment attribute!");
return pImpl->getValueAsInt();
}
-/// This returns the number of dereferenceable bytes.
uint64_t Attribute::getDereferenceableBytes() const {
assert(hasAttribute(Attribute::Dereferenceable) &&
"Trying to get dereferenceable bytes from "
return ASN && ASN->hasAttributes();
}
-/// \brief Return true if the specified attribute is set for at least one
-/// parameter or for the return value.
bool AttributeSet::hasAttrSomewhere(Attribute::AttrKind Attr) const {
if (!pImpl) return false;
return ASN ? ASN->getAsString(InAttrGrp) : std::string("");
}
-/// \brief The attributes for the specified index are returned.
AttributeSetNode *AttributeSet::getAttributes(unsigned Index) const {
if (!pImpl) return nullptr;
// AttributeSet Introspection Methods
//===----------------------------------------------------------------------===//
-/// \brief Return the number of slots used in this attribute list. This is the
-/// number of arguments that have an attribute set on them (including the
-/// function itself).
unsigned AttributeSet::getNumSlots() const {
return pImpl ? pImpl->getNumAttributes() : 0;
}