diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-09 04:37:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-09 04:37:31 +0000 |
commit | d21cd809b656d3011ec089536857e048e037159c (patch) | |
tree | 131bf120f81f62962ffbb7520d785b63cf8d4b16 /lib/Transforms/IPO/SimpleStructMutation.cpp | |
parent | 037b8b70d04ce214464c89d2480811484f9ec13d (diff) |
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
Diffstat (limited to 'lib/Transforms/IPO/SimpleStructMutation.cpp')
-rw-r--r-- | lib/Transforms/IPO/SimpleStructMutation.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<std::pair<unsigned, unsigned> > &Vec, 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 @@ 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)); |