From a470eac6a12c84ef3086a187d0d9e58f57d8528b Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 20 Oct 2009 22:10:05 +0000 Subject: [PATCH] Fix -Asserts warning. llvm-svn: 84687 --- llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp index bde15a94a91c..f422798e315c 100644 --- a/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp +++ b/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp @@ -332,8 +332,9 @@ void ARMInstPrinter::printPredicateOperand(const MCInst *MI, unsigned OpNum) { } void ARMInstPrinter::printSBitModifierOperand(const MCInst *MI, unsigned OpNum){ - if (unsigned Reg = MI->getOperand(OpNum).getReg()) { - assert(Reg == ARM::CPSR && "Expect ARM CPSR register!"); + if (MI->getOperand(OpNum).getReg()) { + assert(MI->getOperand(OpNum).getReg() == ARM::CPSR && + "Expect ARM CPSR register!"); O << 's'; } }