Avoid warning on non assert builds.

llvm-svn: 151025
This commit is contained in:
Rafael Espindola 2012-02-21 03:48:30 +00:00
parent 2d27b0f0ed
commit b2defca267
1 changed files with 3 additions and 2 deletions

View File

@ -503,8 +503,9 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
V = InsertNoopCastOfTo(V,
Type::getInt8PtrTy(Ty->getContext(), PTy->getAddressSpace()));
Instruction *Inst = dyn_cast<Instruction>(V);
assert(!Inst || SE.DT->properlyDominates(Inst, Builder.GetInsertPoint()));
assert(!dyn_cast<Instruction>(V) ||
SE.DT->properlyDominates(dyn_cast<Instruction>(V),
Builder.GetInsertPoint()));
// Expand the operands for a plain byte offset.
Value *Idx = expandCodeFor(SE.getAddExpr(Ops), Ty);