Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 91c9d01..9142f1d 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/lib/Target/TargetData.cpp
@@ -42,9 +42,8 @@
StructSize = 0;
// Loop over each of the elements, placing them in memory...
- for (StructType::ElementTypes::const_iterator
- TI = ST->getElementTypes().begin(),
- TE = ST->getElementTypes().end(); TI != TE; ++TI) {
+ for (StructType::element_iterator TI = ST->element_begin(),
+ TE = ST->element_end(); TI != TE; ++TI) {
const Type *Ty = *TI;
unsigned char A;
unsigned TyAlign;
@@ -227,7 +226,7 @@
Result += Layout->MemberOffsets[FieldNo];
// Update Ty to refer to current element
- Ty = STy->getElementTypes()[FieldNo];
+ Ty = STy->getElementType(FieldNo);
}
}
diff --git a/llvm/lib/Target/X86/InstSelectSimple.cpp b/llvm/lib/Target/X86/InstSelectSimple.cpp
index 45df829..af2544f 100644
--- a/llvm/lib/Target/X86/InstSelectSimple.cpp
+++ b/llvm/lib/Target/X86/InstSelectSimple.cpp
@@ -2103,7 +2103,7 @@
}
// The next type is the member of the structure selected by the
// index.
- Ty = StTy->getElementTypes()[idxValue];
+ Ty = StTy->getElementType(idxValue);
} else if (const SequentialType *SqTy = cast<SequentialType>(Ty)) {
// It's an array or pointer access: [ArraySize x ElementType].