diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-29 14:52:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-29 14:52:02 +0000 |
commit | 7e1fee7ece962e03471d0c7a253c3d23b3cf50ae (patch) | |
tree | cd025d516c3b70a77155066da09bdd21981d84cc /lib/Analysis/ScalarEvolution.cpp | |
parent | 8f49168c4c8b24ab4f22eb0eea0ec8bf150263f1 (diff) |
Use iterators instead of indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 9bc3aa9353..d790e34ade 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. |