From: Dan Gohman Date: Sun, 29 Aug 2010 14:52:02 +0000 (+0000) Subject: Use iterators instead of indices. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7e1fee7ece962e03471d0c7a253c3d23b3cf50ae;p=oota-llvm.git Use iterators instead of indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112428 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 9bc3aa93539..d790e34adec 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -340,8 +340,8 @@ bool SCEVAddRecExpr::isLoopInvariant(const Loop *QueryLoop) const { // This recurrence is variant w.r.t. QueryLoop if any of its operands // are variant. - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (!getOperand(i)->isLoopInvariant(QueryLoop)) + for (op_iterator I = op_begin(), E = op_end(); I != E; ++I) + if (!(*I)->isLoopInvariant(QueryLoop)) return false; // Otherwise it's loop-invariant.