diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-14 21:24:44 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-11-14 21:24:44 +0000 |
commit | 0e7c737f6e512d0fcb884d9abbb7dec6048a7ea9 (patch) | |
tree | 298915720518f5224abdf30a2237197a944ce407 /lib/Target/TargetData.cpp | |
parent | 8d24337eea5f9462908b7ac07a997935e31ddd59 (diff) |
Fix cute little bug that was causing the last
structure offset to be ignored in computing an offset!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 0b4dc98233..02d18c21a5 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -156,7 +156,7 @@ unsigned TargetData::getIndexedOffset(const Type *ptrTy, for (unsigned CurIDX = 0; CurIDX < Idx.size(); ++CurIDX) { if (const StructType *STy = dyn_cast<const StructType>(Ty)) { assert(Idx[CurIDX]->getType() == Type::UByteTy && "Illegal struct idx"); - unsigned FieldNo = ((ConstPoolUInt*)Idx[CurIDX++])->getValue(); + unsigned FieldNo = ((ConstPoolUInt*)Idx[CurIDX])->getValue(); // Get structure layout information... const StructLayout *Layout = getStructLayout(STy); |