From: Anton Korobeynikov Date: Sun, 2 Sep 2007 22:11:14 +0000 (+0000) Subject: Silence warning while compiling with gcc 4.2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=406452dce3af47bc2ee55d9ff72338dcb78f6c3d;p=oota-llvm.git Silence warning while compiling with gcc 4.2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41676 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp index ba428c5bdb3..134d2767861 100644 --- a/lib/CodeGen/MachineBasicBlock.cpp +++ b/lib/CodeGen/MachineBasicBlock.cpp @@ -81,7 +81,8 @@ void ilist_traits::transferNodesFromList( 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; } diff --git a/lib/Transforms/Utils/DemoteRegToStack.cpp b/lib/Transforms/Utils/DemoteRegToStack.cpp index df332b289d0..95b28f13465 100644 --- a/lib/Transforms/Utils/DemoteRegToStack.cpp +++ b/lib/Transforms/Utils/DemoteRegToStack.cpp @@ -122,7 +122,8 @@ AllocaInst* llvm::DemotePHIToStack(PHINode *P) { // Insert load in place of the phi and replace all uses. BasicBlock::iterator InsertPt; for (InsertPt = P->getParent()->getInstList().begin(); - isa(InsertPt); ++InsertPt); + isa(InsertPt); ++InsertPt) + ; /*noop */ Value *V = new LoadInst(Slot, P->getName()+".reload", P); P->replaceAllUsesWith(V);