From d21cd809b656d3011ec089536857e048e037159c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 9 Feb 2004 04:37:31 +0000 Subject: 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 --- lib/Transforms/IPO/SimpleStructMutation.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/IPO/SimpleStructMutation.cpp') diff --git a/lib/Transforms/IPO/SimpleStructMutation.cpp b/lib/Transforms/IPO/SimpleStructMutation.cpp index 809ca403dd..f2061ddb8f 100644 --- a/lib/Transforms/IPO/SimpleStructMutation.cpp +++ b/lib/Transforms/IPO/SimpleStructMutation.cpp @@ -109,7 +109,7 @@ static unsigned getIndex(const std::vector > &Vec, static inline void GetTransformation(const TargetData &TD, const StructType *ST, std::vector &Transform, enum SimpleStructMutation::Transform XForm) { - unsigned NumElements = ST->getElementTypes().size(); + unsigned NumElements = ST->getNumElements(); Transform.reserve(NumElements); switch (XForm) { @@ -124,8 +124,7 @@ static inline void GetTransformation(const TargetData &TD, const StructType *ST, // 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)); -- cgit v1.2.3