mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-04 16:01:46 +00:00
Change a loop in LoopInfo to foreach. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c83d5914c3
commit
c6c9f35804
@ -65,8 +65,8 @@ bool Loop::isLoopInvariant(const Value *V) const {
|
|||||||
/// hasLoopInvariantOperands - Return true if all the operands of the
|
/// hasLoopInvariantOperands - Return true if all the operands of the
|
||||||
/// specified instruction are loop invariant.
|
/// specified instruction are loop invariant.
|
||||||
bool Loop::hasLoopInvariantOperands(const Instruction *I) const {
|
bool Loop::hasLoopInvariantOperands(const Instruction *I) const {
|
||||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
for (auto &Op : I->operands())
|
||||||
if (!isLoopInvariant(I->getOperand(i)))
|
if (!isLoopInvariant(Op))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user