MSP430: Remove implicit ilist iterator conversions, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 20 Oct 2015 01:18:39 +0000 (01:18 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 20 Oct 2015 01:18:39 +0000 (01:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250792 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/MSP430BranchSelector.cpp
lib/Target/MSP430/MSP430ISelLowering.cpp

index ffcf22216d4f1d98adcb265f6259ec0575b183c3..606abc250d98fc0d1b13064da28c384de9e3008e 100644 (file)
@@ -64,7 +64,7 @@ bool MSP430BSel::runOnMachineFunction(MachineFunction &Fn) {
   unsigned FuncSize = 0;
   for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E;
        ++MFI) {
-    MachineBasicBlock *MBB = MFI;
+    MachineBasicBlock *MBB = &*MFI;
 
     unsigned BlockSize = 0;
     for (MachineBasicBlock::iterator MBBI = MBB->begin(), EE = MBB->end();
index d1d1cdb86fe97512b9feca6d4abced4548b03c5c..18f38b7e90daa1f313506b2b3dd8c9afa024ae2b 100644 (file)
@@ -1228,8 +1228,7 @@ MSP430TargetLowering::EmitShiftInstr(MachineInstr *MI,
   }
 
   const BasicBlock *LLVM_BB = BB->getBasicBlock();
-  MachineFunction::iterator I = BB;
-  ++I;
+  MachineFunction::iterator I = ++BB->getIterator();
 
   // Create loop block
   MachineBasicBlock *LoopBB = F->CreateMachineBasicBlock(LLVM_BB);
@@ -1317,8 +1316,7 @@ MSP430TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
   // to set, the condition code register to branch on, the true/false values to
   // select between, and a branch opcode to use.
   const BasicBlock *LLVM_BB = BB->getBasicBlock();
-  MachineFunction::iterator I = BB;
-  ++I;
+  MachineFunction::iterator I = ++BB->getIterator();
 
   //  thisMBB:
   //  ...