Avoid warning on non assert builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151025 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2012-02-21 03:48:30 +00:00
parent 124e51c0d2
commit 161fb5d936

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);