From: Bill Wendling Date: Tue, 9 Oct 2012 01:03:48 +0000 (+0000) Subject: Remove a couple more 'hasAttrSomewhere' calls. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2fd7765ae50aa993bc706df8fea7d0685ea65bf2;p=oota-llvm.git Remove a couple more 'hasAttrSomewhere' calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165470 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 55ab1b7ff08..bed828a8855 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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