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/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index b09d55d..538d9fe 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -853,8 +853,8 @@
 void AttributeSet::dump() const {
   dbgs() << "PAL[ ";
   for (unsigned i = 0; i < getNumSlots(); ++i) {
-    const AttributeWithIndex &PAWI = getSlot(i);
-    dbgs() << "{ " << PAWI.Index << ", " << PAWI.Attrs.getAsString() << " } ";
+    unsigned Index = getSlotIndex(i);
+    dbgs() << "{ " << Index << " => " << getAsString(Index) << " } ";
   }
 
   dbgs() << "]\n";