projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
016daa6
)
Change a loop in LoopInfo to foreach. NFC
author
Pete Cooper
<peter_cooper@apple.com>
Wed, 13 May 2015 01:12:09 +0000
(
01:12
+0000)
committer
Pete Cooper
<peter_cooper@apple.com>
Wed, 13 May 2015 01:12:09 +0000
(
01:12
+0000)
llvm-svn: 237224
llvm/lib/Analysis/LoopInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/LoopInfo.cpp
b/llvm/lib/Analysis/LoopInfo.cpp
index
09045dc
..
932b080
100644
(file)
--- 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;