mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 04:31:17 +00:00
Fix bug: LevelRaise/2003-01-22-GEPProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5407 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3ce8b1a8e
commit
e5fa63a578
@ -120,7 +120,7 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal,
|
||||
Offset -= ActualOffset;
|
||||
} else {
|
||||
const Type *ElTy = cast<SequentialType>(CompTy)->getElementType();
|
||||
if (!ElTy->isSized())
|
||||
if (!ElTy->isSized() || (isa<PointerType>(CompTy) && !Indices.empty()))
|
||||
return 0; // Type is unreasonable... escape!
|
||||
unsigned ElSize = TD.getTypeSize(ElTy);
|
||||
int64_t ElSizeS = ElSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user