Use iterators instead of indices.

llvm-svn: 112428
This commit is contained in:
Dan Gohman 2010-08-29 14:52:02 +00:00
parent dfbed53a84
commit 28a84d4ba1
1 changed files with 2 additions and 2 deletions

View File

@ -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.