[AVR] Prefer BasicBlock::getIterator over Function::begin()

Thanks to Eli Friedman for the suggestion.

llvm-svn: 314182
This commit is contained in:
Dylan McKay 2017-09-26 01:37:53 +00:00
parent e26b7aafe0
commit 1446eedbc2
1 changed files with 1 additions and 1 deletions

View File

@ -1471,7 +1471,7 @@ MachineBasicBlock *AVRTargetLowering::insertShift(MachineInstr &MI,
const BasicBlock *LLVM_BB = BB->getBasicBlock(); const BasicBlock *LLVM_BB = BB->getBasicBlock();
MachineFunction::iterator I; MachineFunction::iterator I;
for (I = F->begin(); I != F->end() && &(*I) != BB; ++I); for (I = BB->getIterator(); I != F->end() && &(*I) != BB; ++I);
if (I != F->end()) ++I; if (I != F->end()) ++I;
// Create loop block. // Create loop block.