[llvm-commits] [llvm] r91564 - /llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp

John McCall rjmccall at apple.com
Wed Dec 16 12:31:50 PST 2009


Author: rjmccall
Date: Wed Dec 16 14:31:50 2009
New Revision: 91564

URL: http://llvm.org/viewvc/llvm-project?rev=91564&view=rev
Log:
Silence a clang warning about the deprecated (but perfectly reasonable in
context) increment-of-bool idiom.


Modified:
    llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp

Modified: llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp?rev=91564&r1=91563&r2=91564&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Thumb1InstrInfo.cpp Wed Dec 16 14:31:50 2009
@@ -180,7 +180,7 @@
   AddDefaultPred(MIB);
   MIB.addReg(0); // No write back.
 
-  bool NumRegs = 0;
+  bool NumRegs = false;
   for (unsigned i = CSI.size(); i != 0; --i) {
     unsigned Reg = CSI[i-1].getReg();
     if (Reg == ARM::LR) {
@@ -192,7 +192,7 @@
       MI = MBB.erase(MI);
     }
     MIB.addReg(Reg, getDefRegState(true));
-    ++NumRegs;
+    NumRegs = true;
   }
 
   // It's illegal to emit pop instruction without operands.





More information about the llvm-commits mailing list