mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
8d24337eea
commit
0e7c737f6e
@ -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
Block a user