Undo r258163 "Move part of an if condition into an assertion. NFC."
This undoes the change made in r258163. The assertion fails if `Ptr` is of a vector type. The previous code doesn't look completely correct either, so I'll investigate this more. llvm-svn: 258411
This commit is contained in:
parent
82e0f15f86
commit
f3ee254bc2
|
@ -731,8 +731,8 @@ static Constant *SymbolicallyEvaluateGEP(Type *SrcTy, ArrayRef<Constant *> Ops,
|
|||
Type *ResultTy, const DataLayout &DL,
|
||||
const TargetLibraryInfo *TLI) {
|
||||
Constant *Ptr = Ops[0];
|
||||
assert(Ptr->getType()->isPointerTy());
|
||||
if (!Ptr->getType()->getPointerElementType()->isSized())
|
||||
if (!Ptr->getType()->getPointerElementType()->isSized() ||
|
||||
!Ptr->getType()->isPointerTy())
|
||||
return nullptr;
|
||||
|
||||
Type *IntPtrTy = DL.getIntPtrType(Ptr->getType());
|
||||
|
|
Loading…
Reference in New Issue