summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SimpleStructMutation.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-09 04:37:31 +0000
committerChris Lattner <sabre@nondot.org>2004-02-09 04:37:31 +0000
commitac6db755c3cd1870e6a99bf7ba65049e6f923e53 (patch)
treedb23ada97a1e7195ba277fd9dcd770026ebbfa52 /llvm/lib/Transforms/IPO/SimpleStructMutation.cpp
parent4da68e2d7b21e988148d612d429cb51315138300 (diff)
downloadbcm5719-llvm-ac6db755c3cd1870e6a99bf7ba65049e6f923e53.tar.gz
bcm5719-llvm-ac6db755c3cd1870e6a99bf7ba65049e6f923e53.zip
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
Diffstat (limited to 'llvm/lib/Transforms/IPO/SimpleStructMutation.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SimpleStructMutation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SimpleStructMutation.cpp b/llvm/lib/Transforms/IPO/SimpleStructMutation.cpp
index 809ca403dd3..f2061ddb8f7 100644
--- a/llvm/lib/Transforms/IPO/SimpleStructMutation.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud