[llvm-commits] [llvm] r41676 - in /llvm/trunk/lib: CodeGen/MachineBasicBlock.cpp Transforms/Utils/DemoteRegToStack.cpp

Anton Korobeynikov asl at math.spbu.ru
Sun Sep 2 15:11:14 PDT 2007


Author: asl
Date: Sun Sep  2 17:11:14 2007
New Revision: 41676

URL: http://llvm.org/viewvc/llvm-project?rev=41676&view=rev
Log:
Silence warning while compiling with gcc 4.2

Modified:
    llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
    llvm/trunk/lib/Transforms/Utils/DemoteRegToStack.cpp

Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=41676&r1=41675&r2=41676&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Sun Sep  2 17:11:14 2007
@@ -81,7 +81,8 @@
 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;
 }

Modified: llvm/trunk/lib/Transforms/Utils/DemoteRegToStack.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/DemoteRegToStack.cpp?rev=41676&r1=41675&r2=41676&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/DemoteRegToStack.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/DemoteRegToStack.cpp Sun Sep  2 17:11:14 2007
@@ -122,7 +122,8 @@
   // 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);
   





More information about the llvm-commits mailing list