From 968f803928ff389513d1feacd3242a3ed1a6c5a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 31 Oct 2006 07:33:13 +0000 Subject: Turn an assert into an error message. This is commonly triggered when we don't support a specific constraint yet. When this happens, print the unsupported constraint. llvm-svn: 31310 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6a2a8e79c1b..374f5673094 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2417,7 +2417,11 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) { GetRegistersForValue(ConstraintCode, ConstraintVTs[i], true, UsesInputRegister, OutputRegs, InputRegs); - assert(!Regs.Regs.empty() && "Couldn't allocate output reg!"); + if (Regs.Regs.empty()) { + std::cerr << "Couldn't allocate output reg for contraint '" + << ConstraintCode << "'!\n"; + exit(1); + } if (!Constraints[i].isIndirectOutput) { assert(RetValRegs.Regs.empty() && -- cgit v1.2.3