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 | 08f43456c9e1916ea2a9ec136c6f47d8bce9f9f8 (patch) | |
tree | 37b7845b98ad588415ff34eb886978a80854992e /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | 1b0e2cbf3fe53185207b3a3c584d451e10195102 (diff) | |
download | llvm-08f43456c9e1916ea2a9ec136c6f47d8bce9f9f8.zip llvm-08f43456c9e1916ea2a9ec136c6f47d8bce9f9f8.tar.gz llvm-08f43456c9e1916ea2a9ec136c6f47d8bce9f9f8.tar.bz2 |
fix PR8983, a broken assertion.
llvm-svn: 123562
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 3008210..55a10d7 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/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()) { |