diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-30 12:45:13 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-30 12:45:13 +0000 |
commit | 39cd0c8e477255a7296b2bd1dc67193f8d38c003 (patch) | |
tree | 554bb34610153ab2b8cd996b6b2a8ca23ba0687b /lib/VMCore/Function.cpp | |
parent | 831737d329a727f53a1fb0572f7b7a8127208881 (diff) |
Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 5ff088e7f5..3cae4d4837 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -79,8 +79,8 @@ unsigned Argument::getArgNo() const { /// in its containing function. bool Argument::hasByValAttr() const { if (!getType()->isPointerTy()) return false; - return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attribute::ByVal); + return getParent()->getAttributes(). + hasAttribute(getArgNo()+1, Attribute::ByVal); } unsigned Argument::getParamAlignment() const { @@ -93,24 +93,24 @@ unsigned Argument::getParamAlignment() const { /// it in its containing function. bool Argument::hasNestAttr() const { if (!getType()->isPointerTy()) return false; - return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attribute::Nest); + return getParent()->getAttributes(). + hasAttribute(getArgNo()+1, Attribute::Nest); } /// hasNoAliasAttr - Return true if this argument has the noalias attribute on /// it in its containing function. bool Argument::hasNoAliasAttr() const { if (!getType()->isPointerTy()) return false; - return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attribute::NoAlias); + return getParent()->getAttributes(). + hasAttribute(getArgNo()+1, Attribute::NoAlias); } /// hasNoCaptureAttr - Return true if this argument has the nocapture attribute /// on it in its containing function. bool Argument::hasNoCaptureAttr() const { if (!getType()->isPointerTy()) return false; - return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attribute::NoCapture); + return getParent()->getAttributes(). + hasAttribute(getArgNo()+1, Attribute::NoCapture); } /// hasSRetAttr - Return true if this argument has the sret attribute on @@ -119,8 +119,8 @@ bool Argument::hasStructRetAttr() const { if (!getType()->isPointerTy()) return false; if (this != getParent()->arg_begin()) return false; // StructRet param must be first param - return getParent()->getParamAttributes(1). - hasAttribute(Attribute::StructRet); + return getParent()->getAttributes(). + hasAttribute(1, Attribute::StructRet); } /// addAttr - Add a Attribute to an argument |