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 | ac6db755c3cd1870e6a99bf7ba65049e6f923e53 (patch) | |
tree | db23ada97a1e7195ba277fd9dcd770026ebbfa52 /llvm/lib/Target/TargetData.cpp | |
parent | 4da68e2d7b21e988148d612d429cb51315138300 (diff) | |
download | bcm5719-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/Target/TargetData.cpp')
-rw-r--r-- | llvm/lib/Target/TargetData.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 91c9d01198c..9142f1dfc1c 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -42,9 +42,8 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) 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 @@ uint64_t TargetData::getIndexedOffset(const Type *ptrTy, Result += Layout->MemberOffsets[FieldNo]; // Update Ty to refer to current element - Ty = STy->getElementTypes()[FieldNo]; + Ty = STy->getElementType(FieldNo); } } |