git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235520
91177308-0d34-0410-b5e6-
96231b3b80d8
}
SmallPtrSet<const Type*, 4> Visited;
}
SmallPtrSet<const Type*, 4> Visited;
- if (!Indices.empty() &&
- !BasePointerType->getElementType()->isSized(&Visited))
+ if (!Indices.empty() && !Ty->isSized(&Visited))
return Error(ID.Loc, "base element of getelementptr must be sized");
if (!GetElementPtrInst::getIndexedType(Ty, Indices))
return Error(ID.Loc, "base element of getelementptr must be sized");
if (!GetElementPtrInst::getIndexedType(Ty, Indices))