mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKind
when removing one attribute. This further encapsulates the use of the attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -133,7 +133,10 @@ void Argument::addAttr(Attribute attr) {
|
||||
|
||||
/// removeAttr - Remove a Attribute from an argument
|
||||
void Argument::removeAttr(Attribute attr) {
|
||||
getParent()->removeAttribute(getArgNo() + 1, attr);
|
||||
AttrBuilder B(attr);
|
||||
getParent()->removeAttributes(getArgNo() + 1,
|
||||
AttributeSet::get(getParent()->getContext(),
|
||||
getArgNo() + 1, B));
|
||||
}
|
||||
|
||||
|
||||
@@ -263,9 +266,9 @@ void Function::addAttributes(unsigned i, AttributeSet attrs) {
|
||||
setAttributes(PAL);
|
||||
}
|
||||
|
||||
void Function::removeAttribute(unsigned i, Attribute attrs) {
|
||||
void Function::removeAttributes(unsigned i, AttributeSet attrs) {
|
||||
AttributeSet PAL = getAttributes();
|
||||
PAL = PAL.removeAttr(getContext(), i, attrs);
|
||||
PAL = PAL.removeAttributes(getContext(), i, attrs);
|
||||
setAttributes(PAL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user