diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
commit | 034b94b17006f51722886b0f2283fb6fb19aca1f (patch) | |
tree | e42e091c12137e9599d0e58bfa4336c4af7333b3 /lib/VMCore/Function.cpp | |
parent | 85022561f9c78446bbc5f745cd9b58f4e5dc92ec (diff) |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 013299e76f..cd3b663ac8 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -80,7 +80,7 @@ unsigned Argument::getArgNo() const { bool Argument::hasByValAttr() const { if (!getType()->isPointerTy()) return false; return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attributes::ByVal); + hasAttribute(Attribute::ByVal); } unsigned Argument::getParamAlignment() const { @@ -94,7 +94,7 @@ unsigned Argument::getParamAlignment() const { bool Argument::hasNestAttr() const { if (!getType()->isPointerTy()) return false; return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attributes::Nest); + hasAttribute(Attribute::Nest); } /// hasNoAliasAttr - Return true if this argument has the noalias attribute on @@ -102,7 +102,7 @@ bool Argument::hasNestAttr() const { bool Argument::hasNoAliasAttr() const { if (!getType()->isPointerTy()) return false; return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attributes::NoAlias); + hasAttribute(Attribute::NoAlias); } /// hasNoCaptureAttr - Return true if this argument has the nocapture attribute @@ -110,7 +110,7 @@ bool Argument::hasNoAliasAttr() const { bool Argument::hasNoCaptureAttr() const { if (!getType()->isPointerTy()) return false; return getParent()->getParamAttributes(getArgNo()+1). - hasAttribute(Attributes::NoCapture); + hasAttribute(Attribute::NoCapture); } /// hasSRetAttr - Return true if this argument has the sret attribute on @@ -120,16 +120,16 @@ bool Argument::hasStructRetAttr() const { if (this != getParent()->arg_begin()) return false; // StructRet param must be first param return getParent()->getParamAttributes(1). - hasAttribute(Attributes::StructRet); + hasAttribute(Attribute::StructRet); } /// addAttr - Add a Attribute to an argument -void Argument::addAttr(Attributes attr) { +void Argument::addAttr(Attribute attr) { getParent()->addAttribute(getArgNo() + 1, attr); } /// removeAttr - Remove a Attribute from an argument -void Argument::removeAttr(Attributes attr) { +void Argument::removeAttr(Attribute attr) { getParent()->removeAttribute(getArgNo() + 1, attr); } @@ -248,13 +248,13 @@ void Function::dropAllReferences() { BasicBlocks.begin()->eraseFromParent(); } -void Function::addAttribute(unsigned i, Attributes attr) { +void Function::addAttribute(unsigned i, Attribute attr) { AttributeSet PAL = getAttributes(); PAL = PAL.addAttr(getContext(), i, attr); setAttributes(PAL); } -void Function::removeAttribute(unsigned i, Attributes attr) { +void Function::removeAttribute(unsigned i, Attribute attr) { AttributeSet PAL = getAttributes(); PAL = PAL.removeAttr(getContext(), i, attr); setAttributes(PAL); |