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 | 3fb79e61c2282a18f7cc936a4877c796aeb9e28d (patch) | |
| tree | dd6807721254dd904b8243e7d6e9e9f7a6ee8cad | |
| parent | 64f7567391d21525c42e0255c3f70366fa5fbba4 (diff) | |
| download | bcm5719-llvm-3fb79e61c2282a18f7cc936a4877c796aeb9e28d.tar.gz bcm5719-llvm-3fb79e61c2282a18f7cc936a4877c796aeb9e28d.zip | |
Fix cute little bug that was causing the last
structure offset to be ignored in computing an offset!
llvm-svn: 1310
| -rw-r--r-- | llvm/lib/Target/TargetData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 0b4dc98233c..02d18c21a5c 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/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); |

