forked from OSchip/llvm-project
[AVR] Prefer BasicBlock::getIterator over Function::begin()
Thanks to Eli Friedman for the suggestion. llvm-svn: 314182
This commit is contained in:
parent
e26b7aafe0
commit
1446eedbc2
|
@ -1471,7 +1471,7 @@ MachineBasicBlock *AVRTargetLowering::insertShift(MachineInstr &MI,
|
|||
const BasicBlock *LLVM_BB = BB->getBasicBlock();
|
||||
|
||||
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;
|
||||
|
||||
// Create loop block.
|
||||
|
|
Loading…
Reference in New Issue