Use iterators instead of indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-08-29 14:52:02 +00:00
parent 8f49168c4c
commit 7e1fee7ece

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.