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
This commit is contained in:
Chris Lattner 2006-10-31 07:33:13 +00:00
parent 59bf47217e
commit 968f803928
1 changed files with 5 additions and 1 deletions

View File

@ -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() &&