diff options
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 |