CodeGen: use range based for loops (NFC)

Simplify the RPOT traversal by using a range based for loop for the
iterator dereference.

llvm-svn: 313687
This commit is contained in:
Saleem Abdulrasool 2017-09-19 22:10:20 +00:00
parent 6888dbcda7
commit 399a4e9b0b
1 changed files with 1 additions and 6 deletions

View File

@ -1182,12 +1182,7 @@ static void propagateSwiftErrorVRegs(FunctionLoweringInfo *FuncInfo) {
// For each machine basic block in reverse post order.
ReversePostOrderTraversal<MachineFunction *> RPOT(FuncInfo->MF);
for (ReversePostOrderTraversal<MachineFunction *>::rpo_iterator
It = RPOT.begin(),
E = RPOT.end();
It != E; ++It) {
MachineBasicBlock *MBB = *It;
for (MachineBasicBlock *MBB : RPOT) {
// For each swifterror value in the function.
for(const auto *SwiftErrorVal : FuncInfo->SwiftErrorVals) {
auto Key = std::make_pair(MBB, SwiftErrorVal);