diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-31 00:49:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-31 00:49:59 +0000 |
commit | 9d30e7208e6b2bc3fa48305e3ae371188f643425 (patch) | |
tree | ae1e458e31434ea097a6c2cdc12e04fc63e00f8f /include/llvm/Instructions.h | |
parent | d60b8ac64fa161646d50c49d6171cb49e6a2c7ee (diff) | |
download | external_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.tar.gz external_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.tar.bz2 external_llvm-9d30e7208e6b2bc3fa48305e3ae371188f643425.zip |
Remove the getAttributesAtIndex and getNumAttrs methods in favor of using the getAttrSomewhere predicate. This prevents the uses of 'Attribute' as a collection of attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index e5faf6e209..a2f3125f9e 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -1352,10 +1352,7 @@ public: /// \brief Determine if any call argument is an aggregate passed by value. bool hasByValArgument() const { - for (unsigned I = 0, E = AttributeList.getNumAttrs(); I != E; ++I) - if (AttributeList.getAttributesAtIndex(I).hasAttribute(Attribute::ByVal)) - return true; - return false; + return AttributeList.hasAttrSomewhere(Attribute::ByVal); } /// getCalledFunction - Return the function called, or null if this is an @@ -3092,10 +3089,7 @@ public: /// \brief Determine if any call argument is an aggregate passed by value. bool hasByValArgument() const { - for (unsigned I = 0, E = AttributeList.getNumAttrs(); I != E; ++I) - if (AttributeList.getAttributesAtIndex(I).hasAttribute(Attribute::ByVal)) - return true; - return false; + return AttributeList.hasAttrSomewhere(Attribute::ByVal); } /// getCalledFunction - Return the function called, or null if this is an |