diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-08-24 23:23:06 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-08-24 23:23:06 +0000 |
commit | 4627679cece264a966faa82a7c5bb79f273d5b6e (patch) | |
tree | 227f40fbf1eb4d5208e75d3eb98ba20e829feaa6 /llvm/lib/Target | |
parent | 085fc4d6c679055fc603650e7d29579b262e11a8 (diff) | |
download | bcm5719-llvm-4627679cece264a966faa82a7c5bb79f273d5b6e.tar.gz bcm5719-llvm-4627679cece264a966faa82a7c5bb79f273d5b6e.zip |
Use range based for loops to avoid needing to re-mention SmallPtrSet size.
llvm-svn: 216351
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/ARM/ARMISelLowering.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86FloatingPoint.cpp | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp index 8478a59e71a..c0d38dfccff 100644 --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -6924,9 +6924,7 @@ EmitSjLjDispatchBlock(MachineInstr *MI, MachineBasicBlock *MBB) const { // N.B. the order the invoke BBs are processed in doesn't matter here. const MCPhysReg *SavedRegs = RI.getCalleeSavedRegs(MF); SmallVector<MachineBasicBlock*, 64> MBBLPads; - for (SmallPtrSet<MachineBasicBlock*, 64>::iterator - I = InvokeBBs.begin(), E = InvokeBBs.end(); I != E; ++I) { - MachineBasicBlock *BB = *I; + for (MachineBasicBlock *BB : InvokeBBs) { // Remove the landing pad successor from the invoke block and replace it // with the new dispatch block. diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp index d3e8facbf15..8fdf50325ea 100644 --- a/llvm/lib/Target/X86/X86FloatingPoint.cpp +++ b/llvm/lib/Target/X86/X86FloatingPoint.cpp @@ -324,10 +324,8 @@ bool FPS::runOnMachineFunction(MachineFunction &MF) { MachineBasicBlock *Entry = MF.begin(); bool Changed = false; - for (df_ext_iterator<MachineBasicBlock*, SmallPtrSet<MachineBasicBlock*, 8> > - I = df_ext_begin(Entry, Processed), E = df_ext_end(Entry, Processed); - I != E; ++I) - Changed |= processBasicBlock(MF, **I); + for (MachineBasicBlock *BB : depth_first_ext(Entry, Processed)) + Changed |= processBasicBlock(MF, *BB); // Process any unreachable blocks in arbitrary order now. if (MF.size() != Processed.size()) |