Silence warning while compiling with gcc 4.2
authorAnton Korobeynikov <asl@math.spbu.ru>
Sun, 2 Sep 2007 22:11:14 +0000 (22:11 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sun, 2 Sep 2007 22:11:14 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41676 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineBasicBlock.cpp
lib/Transforms/Utils/DemoteRegToStack.cpp

index ba428c5bdb32938bf81314d79b755d3ce1e6a88e..134d2767861daa0d5cc89c57a408f8cf4ec9952e 100644 (file)
@@ -81,7 +81,8 @@ void ilist_traits<MachineInstr>::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;
 }
index df332b289d0d4aa4a2c97f46c65d40963fdc3272..95b28f134651aedf3747b4d1ec2bb8486e5b1f68 100644 (file)
@@ -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<PHINode>(InsertPt); ++InsertPt);
+       isa<PHINode>(InsertPt); ++InsertPt)
+    ; /*noop */
   Value *V = new LoadInst(Slot, P->getName()+".reload", P);
   P->replaceAllUsesWith(V);