OSDN Git Service

Use a range-based for loop. NFC.
authorMichael Kuperstein <michael.kuperstein@gmail.com>
Sun, 20 Mar 2016 00:16:13 +0000 (00:16 +0000)
committerMichael Kuperstein <michael.kuperstein@gmail.com>
Sun, 20 Mar 2016 00:16:13 +0000 (00:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263889 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CallFrameOptimization.cpp

index c4bf5a4..f2405a4 100644 (file)
@@ -233,11 +233,11 @@ bool X86CallFrameOptimization::runOnMachineFunction(MachineFunction &MF) {
 
   ContextVector CallSeqVector;
 
-  for (MachineFunction::iterator BB = MF.begin(), E = MF.end(); BB != E; ++BB)
-    for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ++I)
-      if (I->getOpcode() == FrameSetupOpcode) {
+  for (auto &MBB : MF)
+    for (auto &MI : MBB)
+      if (MI.getOpcode() == FrameSetupOpcode) {
         CallContext Context;
-        collectCallInfo(MF, *BB, I, Context);
+        collectCallInfo(MF, MBB, MI, Context);
         CallSeqVector.push_back(Context);
       }