Adjust to the changed StructType interface.  In particular, getElementTypes() is gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/SimpleStructMutation.cpp b/lib/Transforms/IPO/SimpleStructMutation.cpp
index 809ca40..f2061dd 100644
--- a/lib/Transforms/IPO/SimpleStructMutation.cpp
+++ b/lib/Transforms/IPO/SimpleStructMutation.cpp
@@ -109,7 +109,7 @@
 static inline void GetTransformation(const TargetData &TD, const StructType *ST,
                                      std::vector<int> &Transform,
                                    enum SimpleStructMutation::Transform XForm) {
-  unsigned NumElements = ST->getElementTypes().size();
+  unsigned NumElements = ST->getNumElements();
   Transform.reserve(NumElements);
 
   switch (XForm) {
@@ -124,8 +124,7 @@
 
     // Build mapping from index to size
     for (unsigned i = 0; i < NumElements; ++i)
-      ElList.push_back(
-              std::make_pair(i, TD.getTypeSize(ST->getElementTypes()[i])));
+      ElList.push_back(std::make_pair(i,TD.getTypeSize(ST->getElementType(i))));
 
     sort(ElList.begin(), ElList.end(), ptr_fun(FirstLess));