diff options
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Function.cpp | 20 | ||||
-rw-r--r-- | lib/VMCore/Instructions.cpp | 8 |
2 files changed, 14 insertions, 14 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 diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index bb659fc69e..23db33646e 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -348,7 +348,7 @@ bool CallInst::hasFnAttr(Attribute::AttrKind A) const { .hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(AttributeSet::FunctionIndex).hasAttribute(A); + return F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, A); return false; } @@ -356,7 +356,7 @@ bool CallInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const { if (AttributeList.getParamAttributes(i).hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(i).hasAttribute(A); + return F->getAttributes().hasAttribute(i, A); return false; } @@ -577,7 +577,7 @@ bool InvokeInst::hasFnAttr(Attribute::AttrKind A) const { hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(AttributeSet::FunctionIndex).hasAttribute(A); + return F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, A); return false; } @@ -585,7 +585,7 @@ bool InvokeInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const { if (AttributeList.getParamAttributes(i).hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(i).hasAttribute(A); + return F->getAttributes().hasAttribute(i, A); return false; } |