MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
const TargetInstrInfo& TII = *getParent()->getTarget().getInstrInfo();
iterator I = end();
- while (I != begin() && TII.isTerminatorInstr((--I)->getOpcode()));
+ while (I != begin() && TII.isTerminatorInstr((--I)->getOpcode()))
+ ; /*noop */
if (I != end() && !TII.isTerminatorInstr(I->getOpcode())) ++I;
return I;
}
// Insert load in place of the phi and replace all uses.
BasicBlock::iterator InsertPt;
for (InsertPt = P->getParent()->getInstList().begin();
- isa<PHINode>(InsertPt); ++InsertPt);
+ isa<PHINode>(InsertPt); ++InsertPt)
+ ; /*noop */
Value *V = new LoadInst(Slot, P->getName()+".reload", P);
P->replaceAllUsesWith(V);