Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.

This further restricts the use of the Attribute class to the Attribute family of
classes.

llvm-svn: 173098
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index c5b17db..39062e6 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -519,7 +519,8 @@
 
   // Add any return attributes.
   if (PAL.hasAttributes(AttributeSet::ReturnIndex))
-    AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex,
+    AttributesVec.push_back(AttributeWithIndex::get(F->getContext(),
+                                                    AttributeSet::ReturnIndex,
                                                     PAL.getRetAttributes()));
 
   // First, determine the new argument list
@@ -639,7 +640,8 @@
 
     // Add any return attributes.
     if (CallPAL.hasAttributes(AttributeSet::ReturnIndex))
-      AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex,
+      AttributesVec.push_back(AttributeWithIndex::get(F->getContext(),
+                                                      AttributeSet::ReturnIndex,
                                                       CallPAL.getRetAttributes()));
 
     // Loop over the operands, inserting GEP and loads in the caller as