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
This commit is contained in:
Chris Lattner 2006-10-31 07:33:13 +00:00
parent 94b6d6eb6b
commit d03f1581c8

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