From: Gabor Greif Date: Sat, 18 Sep 2010 11:53:39 +0000 (+0000) Subject: do not rely on the implicit-dereference semantics of dyn_cast_or_null X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ea4894a7fcfb8946d1f7b1301aef98f7f6c9f251;p=oota-llvm.git do not rely on the implicit-dereference semantics of dyn_cast_or_null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114277 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index af2eafc47cb..dfdd8b7c89f 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -346,7 +346,7 @@ void IndVarSimplify::RewriteNonIntegerIVs(Loop *L) { PHIs.push_back(PN); for (unsigned i = 0, e = PHIs.size(); i != e; ++i) - if (PHINode *PN = dyn_cast_or_null(PHIs[i])) + if (PHINode *PN = dyn_cast_or_null(&*PHIs[i])) HandleFloatingPointIV(L, PN); // If the loop previously had floating-point IV, ScalarEvolution @@ -395,7 +395,7 @@ void IndVarSimplify::EliminateIVComparisons() { // which are now dead. while (!DeadInsts.empty()) if (Instruction *Inst = - dyn_cast_or_null(DeadInsts.pop_back_val())) + dyn_cast_or_null(&*DeadInsts.pop_back_val())) RecursivelyDeleteTriviallyDeadInstructions(Inst); } @@ -462,7 +462,7 @@ void IndVarSimplify::EliminateIVRemainders() { // which are now dead. while (!DeadInsts.empty()) if (Instruction *Inst = - dyn_cast_or_null(DeadInsts.pop_back_val())) + dyn_cast_or_null(&*DeadInsts.pop_back_val())) RecursivelyDeleteTriviallyDeadInstructions(Inst); } @@ -725,7 +725,7 @@ void IndVarSimplify::RewriteIVExpressions(Loop *L, SCEVExpander &Rewriter) { // which are now dead. while (!DeadInsts.empty()) if (Instruction *Inst = - dyn_cast_or_null(DeadInsts.pop_back_val())) + dyn_cast_or_null(&*DeadInsts.pop_back_val())) RecursivelyDeleteTriviallyDeadInstructions(Inst); }