Remove the last of uses that use the Attribute object as a collection of attributes.

Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.

llvm-svn: 173228
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 5204248c..3a38ca4 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -791,9 +791,12 @@
 
       // Get the original parameter attributes (skipping the first one, that is
       // for the return value.
-      Attribute Attrs = PAL.getParamAttributes(i + 1);
-      if (Attrs.hasAttributes())
-        AttributesVec.push_back(AttributeWithIndex::get(Params.size(), Attrs));
+      if (PAL.hasAttributes(i + 1)) {
+        AttributesVec.
+          push_back(AttributeWithIndex::get(F->getContext(), i + 1,
+                                            PAL.getParamAttributes(i + 1)));
+        AttributesVec.back().Index = Params.size();
+      }
     } else {
       ++NumArgumentsEliminated;
       DEBUG(dbgs() << "DAE - Removing argument " << i << " (" << I->getName()
@@ -859,17 +862,23 @@
       if (ArgAlive[i]) {
         Args.push_back(*I);
         // Get original parameter attributes, but skip return attributes.
-        Attribute Attrs = CallPAL.getParamAttributes(i + 1);
-        if (Attrs.hasAttributes())
-          AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
+        if (CallPAL.hasAttributes(i + 1)) {
+          AttributesVec.
+            push_back(AttributeWithIndex::get(F->getContext(), i + 1,
+                                            CallPAL.getParamAttributes(i + 1)));
+          AttributesVec.back().Index = Args.size();
+        }
       }
 
     // Push any varargs arguments on the list. Don't forget their attributes.
     for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) {
       Args.push_back(*I);
-      Attribute Attrs = CallPAL.getParamAttributes(i + 1);
-      if (Attrs.hasAttributes())
-        AttributesVec.push_back(AttributeWithIndex::get(Args.size(), Attrs));
+      if (CallPAL.hasAttributes(i + 1)) {
+        AttributesVec.
+          push_back(AttributeWithIndex::get(F->getContext(), i + 1,
+                                            CallPAL.getParamAttributes(i + 1)));
+        AttributesVec.back().Index = Args.size();
+      }
     }
 
     if (CallPAL.hasAttributes(AttributeSet::FunctionIndex))