From 766a63d20e89ad5a8b19aba2df0128c1f73174b3 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Thu, 9 Dec 2010 01:23:51 +0000 Subject: [PATCH] Add a textual message to the assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121349 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMAsmPrinter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 901a4ab7edd..09124e49078 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -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");