Inline the only use of the hasParameterOnlyAttrs method.
authorBill Wendling <isanbard@gmail.com>
Wed, 19 Dec 2012 09:04:58 +0000 (09:04 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 19 Dec 2012 09:04:58 +0000 (09:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170517 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Attributes.h
lib/VMCore/Verifier.cpp

index f03e583fa5828cdec2d1f152c8c89bf41a92c800..dff48190235612b34b1460f9578258e8f25604b6 100644 (file)
@@ -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 {
index eaafa68c39ca43ba9dec91237b64153c4107de49..17301872ea9a1d599f852ab23dc7ba844e62f738 100644 (file)
@@ -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);