diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 0b4dc98233cb..02d18c21a5c8 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(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);