Remove a couple more 'hasAttrSomewhere' calls.
authorBill Wendling <isanbard@gmail.com>
Tue, 9 Oct 2012 01:03:48 +0000 (01:03 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 9 Oct 2012 01:03:48 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165470 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 55ab1b7ff08f9d9b8864e5d04eff912f6807148b..bed828a88551ea77b35d60e12fd89e6d121a0b3a 100644 (file)
@@ -1356,7 +1356,10 @@ public:
 
   /// @brief Determine if any call argument is an aggregate passed by value.
   bool hasByValArgument() const {
-    return AttributeList.hasAttrSomewhere(Attribute::ByVal);
+    for (unsigned I = 0, E = AttributeList.getNumAttrs(); I != E; ++I)
+      if (AttributeList.getAttributesAtIndex(I).hasByValAttr())
+        return true;
+    return false;
   }
 
   /// getCalledFunction - Return the function called, or null if this is an
@@ -3128,7 +3131,10 @@ public:
 
   /// @brief Determine if any call argument is an aggregate passed by value.
   bool hasByValArgument() const {
-    return AttributeList.hasAttrSomewhere(Attribute::ByVal);
+    for (unsigned I = 0, E = AttributeList.getNumAttrs(); I != E; ++I)
+      if (AttributeList.getAttributesAtIndex(I).hasByValAttr())
+        return true;
+    return false;
   }
 
   /// getCalledFunction - Return the function called, or null if this is an