diff options
author | Pete Cooper <peter_cooper@apple.com> | 2015-05-13 01:12:09 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2015-05-13 01:12:09 +0000 |
commit | a889c12ecc2b657b06dfe4d32aa367bd98911ebe (patch) | |
tree | e7680742a4b663909b1521f145186874cc342c15 /llvm/lib/Analysis | |
parent | 016daa662fad50588be18388a143f334ecd0a5f7 (diff) | |
download | bcm5719-llvm-a889c12ecc2b657b06dfe4d32aa367bd98911ebe.tar.gz bcm5719-llvm-a889c12ecc2b657b06dfe4d32aa367bd98911ebe.zip |
Change a loop in LoopInfo to foreach. NFC
llvm-svn: 237224
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 09045dcf8e7..932b080eb3e 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -65,8 +65,8 @@ bool Loop::isLoopInvariant(const Value *V) const { /// hasLoopInvariantOperands - Return true if all the operands of the /// specified instruction are loop invariant. bool Loop::hasLoopInvariantOperands(const Instruction *I) const { - for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (!isLoopInvariant(I->getOperand(i))) + for (auto &Op : I->operands()) + if (!isLoopInvariant(Op)) return false; return true; |