Add a textual message to the assert.
authorJim Grosbach <grosbach@apple.com>
Thu, 9 Dec 2010 01:23:51 +0000 (01:23 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 9 Dec 2010 01:23:51 +0000 (01:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121349 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMAsmPrinter.cpp

index 901a4ab7edd2e19e416d1c3a12a122778a3e1570..09124e49078c1129b29f2a2e7ea849e41e9b24ca 100644 (file)
@@ -720,7 +720,8 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) {
   case ARM::t2ADDrSPi12:
   case ARM::t2SUBrSPi:
   case ARM::t2SUBrSPi12:
-    assert (MI->getOperand(1).getReg() == ARM::SP);
+    assert ((MI->getOperand(1).getReg() == ARM::SP) &&
+            "Unexpected source register!");
     break;
 
   case ARM::t2MOVi32imm: assert(0 && "Should be lowered by thumb2it pass");