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
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp
index 4d047f6..f2f3ec9 100644
--- a/lib/IR/Function.cpp
+++ b/lib/IR/Function.cpp
@@ -133,7 +133,10 @@
 
 /// 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 @@
   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);
 }