diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-04-30 22:17:38 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-04-30 22:17:38 +0000 |
commit | 846781235d0c027702e2c528a6660ec14ca8edcd (patch) | |
tree | 30d199a2f92353f75a2999963407574de30c1343 /lib/CodeGen/RegisterCoalescer.cpp | |
parent | fff0879df07ce0f449b00a9ed4b3d7732735bc4e (diff) | |
download | llvm-846781235d0c027702e2c528a6660ec14ca8edcd.tar.gz llvm-846781235d0c027702e2c528a6660ec14ca8edcd.tar.bz2 llvm-846781235d0c027702e2c528a6660ec14ca8edcd.tar.xz |
Convert more loops to range-based equivalents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 0fb59d6768..5aaeb874d6 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -241,9 +241,8 @@ static bool isSplitEdge(const MachineBasicBlock *MBB) { if (MBB->pred_size() != 1 || MBB->succ_size() != 1) return false; - for (MachineBasicBlock::const_iterator MII = MBB->begin(), E = MBB->end(); - MII != E; ++MII) { - if (!MII->isCopyLike() && !MII->isUnconditionalBranch()) + for (const auto &MI : *MBB) { + if (!MI.isCopyLike() && !MI.isUnconditionalBranch()) return false; } return true; |