diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-21 03:48:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-02-21 03:48:30 +0000 |
commit | 161fb5d936e8feb730b5598243e20c76d3dc62f7 (patch) | |
tree | 903988371d05bab7e714ca99f31477232e7a1b59 /lib/Analysis/ScalarEvolutionExpander.cpp | |
parent | 124e51c0d2b521b0fb3aaaf2443403cd451b7857 (diff) |
Avoid warning on non assert builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index 345c8a700b..5c52b88ac2 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -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); |