1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Silence warning while compiling with gcc 4.2

llvm-svn: 41676
This commit is contained in:
Anton Korobeynikov 2007-09-02 22:11:14 +00:00
parent 32567436f8
commit 5b49f44609
2 changed files with 4 additions and 2 deletions

View File

@ -81,7 +81,8 @@ void ilist_traits<MachineInstr>::transferNodesFromList(
MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() { MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() {
const TargetInstrInfo& TII = *getParent()->getTarget().getInstrInfo(); const TargetInstrInfo& TII = *getParent()->getTarget().getInstrInfo();
iterator I = end(); 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; if (I != end() && !TII.isTerminatorInstr(I->getOpcode())) ++I;
return I; return I;
} }

View File

@ -122,7 +122,8 @@ AllocaInst* llvm::DemotePHIToStack(PHINode *P) {
// Insert load in place of the phi and replace all uses. // Insert load in place of the phi and replace all uses.
BasicBlock::iterator InsertPt; BasicBlock::iterator InsertPt;
for (InsertPt = P->getParent()->getInstList().begin(); for (InsertPt = P->getParent()->getInstList().begin();
isa<PHINode>(InsertPt); ++InsertPt); isa<PHINode>(InsertPt); ++InsertPt)
; /*noop */
Value *V = new LoadInst(Slot, P->getName()+".reload", P); Value *V = new LoadInst(Slot, P->getName()+".reload", P);
P->replaceAllUsesWith(V); P->replaceAllUsesWith(V);