diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-16 03:43:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-16 03:43:53 +0000 |
commit | 156eb0a569a1ebac86ad8438645f690d8a3894c4 (patch) | |
tree | fd2c93d6f15153df3cbb49f68d44c2d5c4dd13c7 /lib/Analysis/ConstantFolding.cpp | |
parent | c1a62834a2ad33a80ca2b1f3a549f4f7806cd320 (diff) |
fix PR8983, a broken assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 300821026a..55a10d716b 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -581,7 +581,7 @@ static Constant *SymbolicallyEvaluateGEP(Constant *const *Ops, unsigned NumOps, if (NumOps == 2 && cast<PointerType>(ResultTy)->getElementType()->isIntegerTy(8)) { ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); - assert(CE->getType() == IntPtrTy && + assert((CE == 0 || CE->getType() == IntPtrTy) && "CastGEPIndices didn't canonicalize index types!"); if (CE && CE->getOpcode() == Instruction::Sub && CE->getOperand(0)->isNullValue()) { |