aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-08-06 20:22:46 +0000
committerPete Cooper <peter_cooper@apple.com>2015-08-06 20:22:46 +0000
commitebcd748927d45be39b2690acab7038a003bdb17f (patch)
tree756d58fbf5490c49cb38afdea5767454c1cb548a /llvm/lib/Target/ARM/ARMFastISel.cpp
parentb9583d22eb8dee3b7d6a299ffb54959d77ad52b4 (diff)
downloadllvm-ebcd748927d45be39b2690acab7038a003bdb17f.zip
llvm-ebcd748927d45be39b2690acab7038a003bdb17f.tar.gz
llvm-ebcd748927d45be39b2690acab7038a003bdb17f.tar.bz2
Convert a bunch of loops to foreach. NFC.
After r244074, we now have a successors() method to iterate over all the successors of a TerminatorInst. This commit changes a bunch of eligible loops to use it. llvm-svn: 244260
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index fdd0763..0f6c4e14 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/lib/Target/ARM/ARMFastISel.cpp
@@ -1355,8 +1355,8 @@ bool ARMFastISel::SelectIndirectBr(const Instruction *I) {
TII.get(Opc)).addReg(AddrReg));
const IndirectBrInst *IB = cast<IndirectBrInst>(I);
- for (unsigned i = 0, e = IB->getNumSuccessors(); i != e; ++i)
- FuncInfo.MBB->addSuccessor(FuncInfo.MBBMap[IB->getSuccessor(i)]);
+ for (const BasicBlock *SuccBB : IB->successors())
+ FuncInfo.MBB->addSuccessor(FuncInfo.MBBMap[SuccBB]);
return true;
}