1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Fix bug: LevelRaise/2003-06-07-EmptyArrayTest.ll

llvm-svn: 6669
This commit is contained in:
Chris Lattner 2003-06-07 21:45:42 +00:00
parent 5bc76cec9a
commit 326e1fb77d

View File

@ -56,7 +56,8 @@ const Type *getStructOffsetType(const Type *Ty, unsigned &Offset,
ThisOffset = Offset; ThisOffset = Offset;
NextType = getStructOffsetStep(STy, ThisOffset, Indices, TD); NextType = getStructOffsetStep(STy, ThisOffset, Indices, TD);
} else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { } else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {
assert(Offset < TD.getTypeSize(ATy) && "Offset not in composite!"); assert(Offset == 0 || Offset < TD.getTypeSize(ATy) &&
"Offset not in composite!");
NextType = ATy->getElementType(); NextType = ATy->getElementType();
unsigned ChildSize = TD.getTypeSize(NextType); unsigned ChildSize = TD.getTypeSize(NextType);