From 5d122b6ec0767a543f797fafc77c1ad8e018b08b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 19 Dec 2012 09:04:58 +0000 Subject: [PATCH] Inline the only use of the hasParameterOnlyAttrs method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170517 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Attributes.h | 8 -------- lib/VMCore/Verifier.cpp | 5 ++++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index f03e583fa58..dff48190235 100644 --- a/include/llvm/Attributes.h +++ b/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/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index eaafa68c39c..17301872ea9 100644 --- a/lib/VMCore/Verifier.cpp +++ b/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); -- 2.34.1