Change a loop in LoopInfo to foreach. NFC

llvm-svn: 237224
This commit is contained in:
Pete Cooper 2015-05-13 01:12:09 +00:00
parent 016daa662f
commit a889c12ecc
1 changed files with 2 additions and 2 deletions

View File

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