From: Bill Wendling Date: Wed, 19 Dec 2012 09:04:58 +0000 (+0000) Subject: Inline the only use of the hasParameterOnlyAttrs method. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9506a211fc5db8f98b17fc3e7572ae1c9c9b585;p=platform%2Fupstream%2Fllvm.git Inline the only use of the hasParameterOnlyAttrs method. llvm-svn: 170517 --- diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h index f03e583..dff4819 100644 --- a/llvm/include/llvm/Attributes.h +++ b/llvm/include/llvm/Attributes.h @@ -117,14 +117,6 @@ public: /// 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 { diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index eaafa68..1730187 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -534,7 +534,10 @@ void Verifier::VerifyParameterAttrs(Attribute Attrs, Type *Ty, "' 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);