Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 98c2602..73d9323 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -147,10 +147,10 @@
       Function *F = (*I)->getFunction();
       const AttributeSet &PAL = F->getAttributes();
       const AttributeSet &NPAL =
-        PAL.addFnAttributes(F->getContext(),
-                            AttributeSet::get(F->getContext(),
-                                              AttributeSet::FunctionIndex,
-                                              NewAttributes));
+        PAL.addAttributes(F->getContext(), AttributeSet::FunctionIndex,
+                          AttributeSet::get(F->getContext(),
+                                            AttributeSet::FunctionIndex,
+                                            NewAttributes));
       if (PAL != NPAL) {
         MadeChange = true;
         F->setAttributes(NPAL);
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index 12311c3..a309bce 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/lib/Transforms/Utils/CloneFunction.cpp
@@ -98,11 +98,13 @@
         Anew->addAttr(OldFunc->getAttributes()
                        .getParamAttributes(I->getArgNo() + 1));
     NewFunc->setAttributes(NewFunc->getAttributes()
-                           .addRetAttributes(NewFunc->getContext(),
-                                             OldFunc->getAttributes()));
+                           .addAttributes(NewFunc->getContext(),
+                                          AttributeSet::ReturnIndex,
+                                          OldFunc->getAttributes()));
     NewFunc->setAttributes(NewFunc->getAttributes()
-                           .addFnAttributes(NewFunc->getContext(),
-                                            OldFunc->getAttributes()));
+                           .addAttributes(NewFunc->getContext(),
+                                          AttributeSet::FunctionIndex,
+                                          OldFunc->getAttributes()));
 
   }