From: Chris Lattner Date: Tue, 31 Oct 2006 07:33:13 +0000 (+0000) Subject: Turn an assert into an error message. This is commonly triggered when X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d03f1581c8a854fdbe4f5a738e9322341c2bc77f;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31310 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6a2a8e79c1b..374f5673094 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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() &&