diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-31 23:38:01 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-31 23:38:01 +0000 |
commit | 39da078977ae98b6bf1c3c76a472ed24f5f2a2d2 (patch) | |
tree | 90e6efda8721fa5aeafbbe511bbd6f498d66f297 /lib/IR | |
parent | 03c209733bd5459d84177e43eb19dabe64be3da7 (diff) | |
download | external_llvm-39da078977ae98b6bf1c3c76a472ed24f5f2a2d2.zip external_llvm-39da078977ae98b6bf1c3c76a472ed24f5f2a2d2.tar.gz external_llvm-39da078977ae98b6bf1c3c76a472ed24f5f2a2d2.tar.bz2 |
s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Attributes.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index c2ea2b2..14aba08 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -437,7 +437,7 @@ uint64_t AttributeSetImpl::Raw(uint64_t Index) const { for (AttributeSetNode::const_iterator II = ASN->begin(), IE = ASN->end(); II != IE; ++II) - B.addAttributes(*II); + B.addAttribute(*II); return B.Raw(); } @@ -596,7 +596,7 @@ AttributeSet AttributeSet::addAttributes(LLVMContext &C, unsigned Idx, if (Attrs.getSlotIndex(I) == Idx) { for (AttributeSetImpl::const_iterator II = Attrs.pImpl->begin(I), IE = Attrs.pImpl->end(I); II != IE; ++II) - B.addAttributes(*II); + B.addAttribute(*II); break; } @@ -798,7 +798,7 @@ AttrBuilder::AttrBuilder(AttributeSet AS, unsigned Idx) for (AttributeSetImpl::const_iterator II = pImpl->begin(I), IE = pImpl->end(I); II != IE; ++II) - addAttributes(*II); + addAttribute(*II); break; } @@ -816,18 +816,7 @@ AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrKind Val) { return *this; } -AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) { - Attrs.erase(Val); - - if (Val == Attribute::Alignment) - Alignment = 0; - else if (Val == Attribute::StackAlignment) - StackAlignment = 0; - - return *this; -} - -AttrBuilder &AttrBuilder::addAttributes(Attribute Attr) { +AttrBuilder &AttrBuilder::addAttribute(Attribute Attr) { ConstantInt *Kind = cast<ConstantInt>(Attr.getAttributeKind()); Attribute::AttrKind KindVal = Attribute::AttrKind(Kind->getZExtValue()); Attrs.insert(KindVal); @@ -839,6 +828,17 @@ AttrBuilder &AttrBuilder::addAttributes(Attribute Attr) { return *this; } +AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) { + Attrs.erase(Val); + + if (Val == Attribute::Alignment) + Alignment = 0; + else if (Val == Attribute::StackAlignment) + StackAlignment = 0; + + return *this; +} + AttrBuilder &AttrBuilder::removeAttributes(AttributeSet A, uint64_t Index) { uint64_t Mask = A.Raw(Index); |