/// alignment value.
unsigned getStackAlignment() const;
- /// \brief Attribute that only apply to function parameters.
- bool hasParameterOnlyAttrs() const {
- return hasAttribute(Attribute::ByVal) ||
- hasAttribute(Attribute::Nest) ||
- hasAttribute(Attribute::StructRet) ||
- hasAttribute(Attribute::NoCapture);
- }
-
/// \brief Attribute that may be applied to the function itself. These cannot
/// be used on return values or function parameters.
bool hasFunctionOnlyAttrs() const {
"' only apply to functions!", V);
if (isReturnValue)
- Assert1(!Attrs.hasParameterOnlyAttrs(),
+ Assert1(!Attrs.hasAttribute(Attribute::ByVal) &&
+ !Attrs.hasAttribute(Attribute::Nest) &&
+ !Attrs.hasAttribute(Attribute::StructRet) &&
+ !Attrs.hasAttribute(Attribute::NoCapture),
"Attribute 'byval', 'nest', 'sret', and 'nocapture' "
"do not apply to return values!", V);