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

llvm-svn: 173499
diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp
index 50bfef5..2560c6e 100644
--- a/llvm/lib/Target/CppBackend/CPPBackend.cpp
+++ b/llvm/lib/Target/CppBackend/CPPBackend.cpp
@@ -473,7 +473,7 @@
     Out << "SmallVector<AttributeWithIndex, 4> Attrs;"; nl(Out);
     Out << "AttributeWithIndex PAWI;"; nl(Out);
     for (unsigned i = 0; i < PAL.getNumSlots(); ++i) {
-      unsigned index = PAL.getSlot(i).Index;
+      unsigned index = PAL.getSlotIndex(i);
       AttrBuilder attrs(PAL.getSlot(i).Attrs);
       Out << "PAWI.Index = " << index << "U;\n";
       Out << " {\n    AttrBuilder B;\n";