summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430
diff options
context:
space:
mode:
authorAlex Bradbury <asb@lowrisc.org>2017-08-22 09:11:41 +0000
committerAlex Bradbury <asb@lowrisc.org>2017-08-22 09:11:41 +0000
commit378757fdf73b052a0155e276f4ab5ab5b7b30091 (patch)
tree73cb3dd79d2d5e0d7d738710fa8153b0a515cfd5 /lib/Target/MSP430
parent95a4133b77a6b8be19f9c338fdf8a5c9c8aa2f29 (diff)
Use report_fatal_error for unsupported calling conventions
The calling convention can be specified by the user in IR. Failing to support a particular calling convention isn't a programming error, and so relying on llvm_unreachable to catch and report an unsupported calling convention is not appropriate. Differential Revision: https://reviews.llvm.org/D36830 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r--lib/Target/MSP430/MSP430ISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/MSP430/MSP430ISelLowering.cpp b/lib/Target/MSP430/MSP430ISelLowering.cpp
index dae14fd301e..55e371f1d22 100644
--- a/lib/Target/MSP430/MSP430ISelLowering.cpp
+++ b/lib/Target/MSP430/MSP430ISelLowering.cpp
@@ -546,7 +546,7 @@ SDValue MSP430TargetLowering::LowerFormalArguments(
switch (CallConv) {
default:
- llvm_unreachable("Unsupported calling convention");
+ report_fatal_error("Unsupported calling convention");
case CallingConv::C:
case CallingConv::Fast:
return LowerCCCArguments(Chain, CallConv, isVarArg, Ins, dl, DAG, InVals);
@@ -576,7 +576,7 @@ MSP430TargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
switch (CallConv) {
default:
- llvm_unreachable("Unsupported calling convention");
+ report_fatal_error("Unsupported calling convention");
case CallingConv::MSP430_BUILTIN:
case CallingConv::Fast:
case CallingConv::C: