diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-13 02:39:05 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-13 02:39:05 +0000 |
commit | 5b4c837c588f5aeff9f10af5a79b5377fd39ed09 (patch) | |
tree | 40619c9140a14d7b47b9c2ae3eabbb6cfd4654c3 /llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | |
parent | 19e291aac04f3fcaf3de55763e496b187158c938 (diff) | |
download | bcm5719-llvm-5b4c837c588f5aeff9f10af5a79b5377fd39ed09.tar.gz bcm5719-llvm-5b4c837c588f5aeff9f10af5a79b5377fd39ed09.zip |
TransformUtils: Remove implicit ilist iterator conversions, NFC
Continuing the work from last week to remove implicit ilist iterator
conversions. First related commit was probably r249767, with some more
motivation in r249925. This edition gets LLVMTransformUtils compiling
without the implicit conversions.
No functional change intended.
llvm-svn: 250142
Diffstat (limited to 'llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index 7e00a80989d..6b1d1dae5f0 100644 --- a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -50,11 +50,11 @@ bool UnifyFunctionExitNodes::runOnFunction(Function &F) { // std::vector<BasicBlock*> ReturningBlocks; std::vector<BasicBlock*> UnreachableBlocks; - for(Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - if (isa<ReturnInst>(I->getTerminator())) - ReturningBlocks.push_back(I); - else if (isa<UnreachableInst>(I->getTerminator())) - UnreachableBlocks.push_back(I); + for (BasicBlock &I : F) + if (isa<ReturnInst>(I.getTerminator())) + ReturningBlocks.push_back(&I); + else if (isa<UnreachableInst>(I.getTerminator())) + UnreachableBlocks.push_back(&I); // Then unreachable blocks. if (UnreachableBlocks.empty()) { |