diff options
author | Eric Christopher <echristo@apple.com> | 2012-07-02 21:16:43 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-07-02 21:16:43 +0000 |
commit | 9eb4f8a3e665e0fe37509e632b97877b29b3c106 (patch) | |
tree | a05a19e8041e0219d299bc64c2cffd5bbc5eea3f | |
parent | e45658cc3c47d21140ee8680fb22bf664a996fbd (diff) | |
download | external_llvm-9eb4f8a3e665e0fe37509e632b97877b29b3c106.zip external_llvm-9eb4f8a3e665e0fe37509e632b97877b29b3c106.tar.gz external_llvm-9eb4f8a3e665e0fe37509e632b97877b29b3c106.tar.bz2 |
Turn an assert into an error to make it a bit more friendly.
Part of rdar://6880388 and rdar://11766377
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159590 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 72e5769..4fd95e9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6250,8 +6250,15 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) { assert((OpInfo.ConstraintType == TargetLowering::C_RegisterClass || OpInfo.ConstraintType == TargetLowering::C_Register) && "Unknown constraint type!"); - assert(!OpInfo.isIndirect && - "Don't know how to handle indirect register inputs yet!"); + + // TODO: Support this. + if (OpInfo.isIndirect) { + LLVMContext &Ctx = *DAG.getContext(); + Ctx.emitError(CS.getInstruction(), + "Don't know how to handle indirect register inputs yet " + "for constraint '" + Twine(OpInfo.ConstraintCode) + "'"); + break; + } // Copy the input into the appropriate registers. if (OpInfo.AssignedRegs.Regs.empty()) { |