summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-08 00:09:16 +0000
committerChris Lattner <sabre@nondot.org>2010-04-08 00:09:16 +0000
commit6129c376935db12dc79f6d515a1d96632adb480c (patch)
tree5fef32d8adfababc915a74b5f2234e213be797b5 /lib
parent2dbc8bdfe9191c2078daccbeefba9e69a690feb6 (diff)
downloadllvm-6129c376935db12dc79f6d515a1d96632adb480c.tar.gz
llvm-6129c376935db12dc79f6d515a1d96632adb480c.tar.bz2
llvm-6129c376935db12dc79f6d515a1d96632adb480c.tar.xz
convert a report_fatal_error that I was able to trigger into a nice error
so the user at least knows what inline asm is a problem. For example: error: inline asm not supported yet: don't know how to handle tied indirect register inputs pr8788-1.c:14:10: note: generated from here asm ("\n" : "+r" (stack->regs) ^ Instead of: fatal error: error in backend: Don't know how to handle tied indirect register inputs yet! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index d783dd0b25..e8e9498628 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -28,6 +28,7 @@
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/IntrinsicInst.h"
+#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/CodeGen/FastISel.h"
#include "llvm/CodeGen/GCStrategy.h"
@@ -5497,9 +5498,14 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
if (InlineAsm::isRegDefKind(OpFlag) ||
InlineAsm::isRegDefEarlyClobberKind(OpFlag)) {
// Add (OpFlag&0xffff)>>3 registers to MatchedRegs.
- if (OpInfo.isIndirect)
- report_fatal_error("Don't know how to handle tied indirect "
- "register inputs yet!");
+ if (OpInfo.isIndirect) {
+ // This happens on gcc/testsuite/gcc.dg/pr8788-1.c
+ LLVMContext &Ctx = CurMBB->getParent()->getFunction()->getContext();
+ Ctx.emitError(CS.getInstruction(), "inline asm not supported yet:"
+ " don't know how to handle tied "
+ "indirect register inputs");
+ }
+
RegsForValue MatchedRegs;
MatchedRegs.TLI = &TLI;
MatchedRegs.ValueVTs.push_back(InOperandVal.getValueType());