mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-07 12:18:32 +00:00
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
This commit is contained in:
@@ -345,7 +345,7 @@ public:
|
|||||||
addRawValue(B);
|
addRawValue(B);
|
||||||
}
|
}
|
||||||
AttrBuilder(const Attribute &A) : Alignment(0), StackAlignment(0) {
|
AttrBuilder(const Attribute &A) : Alignment(0), StackAlignment(0) {
|
||||||
addAttributes(A);
|
addAttribute(A);
|
||||||
}
|
}
|
||||||
AttrBuilder(AttributeSet AS, unsigned Idx);
|
AttrBuilder(AttributeSet AS, unsigned Idx);
|
||||||
|
|
||||||
@@ -354,12 +354,12 @@ public:
|
|||||||
/// \brief Add an attribute to the builder.
|
/// \brief Add an attribute to the builder.
|
||||||
AttrBuilder &addAttribute(Attribute::AttrKind Val);
|
AttrBuilder &addAttribute(Attribute::AttrKind Val);
|
||||||
|
|
||||||
|
/// \brief Add the Attribute object to the builder.
|
||||||
|
AttrBuilder &addAttribute(Attribute A);
|
||||||
|
|
||||||
/// \brief Remove an attribute from the builder.
|
/// \brief Remove an attribute from the builder.
|
||||||
AttrBuilder &removeAttribute(Attribute::AttrKind Val);
|
AttrBuilder &removeAttribute(Attribute::AttrKind Val);
|
||||||
|
|
||||||
/// \brief Add the attributes to the builder.
|
|
||||||
AttrBuilder &addAttributes(Attribute A);
|
|
||||||
|
|
||||||
/// \brief Remove the attributes from the builder.
|
/// \brief Remove the attributes from the builder.
|
||||||
AttrBuilder &removeAttributes(AttributeSet A, uint64_t Index);
|
AttrBuilder &removeAttributes(AttributeSet A, uint64_t Index);
|
||||||
|
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ uint64_t AttributeSetImpl::Raw(uint64_t Index) const {
|
|||||||
|
|
||||||
for (AttributeSetNode::const_iterator II = ASN->begin(),
|
for (AttributeSetNode::const_iterator II = ASN->begin(),
|
||||||
IE = ASN->end(); II != IE; ++II)
|
IE = ASN->end(); II != IE; ++II)
|
||||||
B.addAttributes(*II);
|
B.addAttribute(*II);
|
||||||
return B.Raw();
|
return B.Raw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -596,7 +596,7 @@ AttributeSet AttributeSet::addAttributes(LLVMContext &C, unsigned Idx,
|
|||||||
if (Attrs.getSlotIndex(I) == Idx) {
|
if (Attrs.getSlotIndex(I) == Idx) {
|
||||||
for (AttributeSetImpl::const_iterator II = Attrs.pImpl->begin(I),
|
for (AttributeSetImpl::const_iterator II = Attrs.pImpl->begin(I),
|
||||||
IE = Attrs.pImpl->end(I); II != IE; ++II)
|
IE = Attrs.pImpl->end(I); II != IE; ++II)
|
||||||
B.addAttributes(*II);
|
B.addAttribute(*II);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -798,7 +798,7 @@ AttrBuilder::AttrBuilder(AttributeSet AS, unsigned Idx)
|
|||||||
|
|
||||||
for (AttributeSetImpl::const_iterator II = pImpl->begin(I),
|
for (AttributeSetImpl::const_iterator II = pImpl->begin(I),
|
||||||
IE = pImpl->end(I); II != IE; ++II)
|
IE = pImpl->end(I); II != IE; ++II)
|
||||||
addAttributes(*II);
|
addAttribute(*II);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -816,18 +816,7 @@ AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrKind Val) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) {
|
AttrBuilder &AttrBuilder::addAttribute(Attribute Attr) {
|
||||||
Attrs.erase(Val);
|
|
||||||
|
|
||||||
if (Val == Attribute::Alignment)
|
|
||||||
Alignment = 0;
|
|
||||||
else if (Val == Attribute::StackAlignment)
|
|
||||||
StackAlignment = 0;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
AttrBuilder &AttrBuilder::addAttributes(Attribute Attr) {
|
|
||||||
ConstantInt *Kind = cast<ConstantInt>(Attr.getAttributeKind());
|
ConstantInt *Kind = cast<ConstantInt>(Attr.getAttributeKind());
|
||||||
Attribute::AttrKind KindVal = Attribute::AttrKind(Kind->getZExtValue());
|
Attribute::AttrKind KindVal = Attribute::AttrKind(Kind->getZExtValue());
|
||||||
Attrs.insert(KindVal);
|
Attrs.insert(KindVal);
|
||||||
@@ -839,6 +828,17 @@ AttrBuilder &AttrBuilder::addAttributes(Attribute Attr) {
|
|||||||
return *this;
|
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) {
|
AttrBuilder &AttrBuilder::removeAttributes(AttributeSet A, uint64_t Index) {
|
||||||
uint64_t Mask = A.Raw(Index);
|
uint64_t Mask = A.Raw(Index);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user