aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-31 07:33:13 +0000
committerChris Lattner <sabre@nondot.org>2006-10-31 07:33:13 +0000
commitd03f1581c8a854fdbe4f5a738e9322341c2bc77f (patch)
treedb6c2ae88136c793e396b18d1e9cc43cb903771e /lib/CodeGen
parent94b6d6eb6b52a9a257ee1b6885861a8c326f836b (diff)
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 6a2a8e79c1..374f567309 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() &&