forked from OSchip/llvm-project
Fix cute little bug that was causing the last
structure offset to be ignored in computing an offset! llvm-svn: 1310
This commit is contained in:
parent
64f7567391
commit
3fb79e61c2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue