Silence a clang warning about the deprecated (but perfectly reasonable in

context) increment-of-bool idiom.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John McCall 2009-12-16 20:31:50 +00:00
parent 819309efec
commit 6eeccd4aa4

View File

@ -180,7 +180,7 @@ restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
AddDefaultPred(MIB); AddDefaultPred(MIB);
MIB.addReg(0); // No write back. MIB.addReg(0); // No write back.
bool NumRegs = 0; bool NumRegs = false;
for (unsigned i = CSI.size(); i != 0; --i) { for (unsigned i = CSI.size(); i != 0; --i) {
unsigned Reg = CSI[i-1].getReg(); unsigned Reg = CSI[i-1].getReg();
if (Reg == ARM::LR) { if (Reg == ARM::LR) {
@ -192,7 +192,7 @@ restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
MI = MBB.erase(MI); MI = MBB.erase(MI);
} }
MIB.addReg(Reg, getDefRegState(true)); MIB.addReg(Reg, getDefRegState(true));
++NumRegs; NumRegs = true;
} }
// It's illegal to emit pop instruction without operands. // It's illegal to emit pop instruction without operands.