- /// @brief Parameter attributes that do not apply to vararg call arguments.
- bool hasIncompatibleWithVarArgsAttrs() const {
- return hasAttribute(Attribute::StructRet);
- }
-
- /// @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 {
- return hasAttribute(Attribute::NoReturn) ||
- hasAttribute(Attribute::NoUnwind) ||
- hasAttribute(Attribute::ReadNone) ||
- hasAttribute(Attribute::ReadOnly) ||
- hasAttribute(Attribute::NoInline) ||
- hasAttribute(Attribute::AlwaysInline) ||
- hasAttribute(Attribute::OptimizeForSize) ||
- hasAttribute(Attribute::StackProtect) ||
- hasAttribute(Attribute::StackProtectReq) ||
- hasAttribute(Attribute::NoRedZone) ||
- hasAttribute(Attribute::NoImplicitFloat) ||
- hasAttribute(Attribute::Naked) ||
- hasAttribute(Attribute::InlineHint) ||
- hasAttribute(Attribute::StackAlignment) ||
- hasAttribute(Attribute::UWTable) ||
- hasAttribute(Attribute::NonLazyBind) ||
- hasAttribute(Attribute::ReturnsTwice) ||
- hasAttribute(Attribute::AddressSafety) ||
- hasAttribute(Attribute::MinSize);
- }
-