Use the new 'getSlotIndex' method to retrieve the attribute's slot index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173499 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp
index 6fe4316..52d4e2f 100644
--- a/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2072,7 +2072,7 @@
       continue;
 
     // There can be only one.
-    return Attrs.removeAttribute(C, Attrs.getSlot(i).Index, Attribute::Nest);
+    return Attrs.removeAttribute(C, Attrs.getSlotIndex(i), Attribute::Nest);
   }
 
   return Attrs;