summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreISelLowering.cpp
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
commit080f6976c0d0f322f60f2f72e2ab47a480da1811 (patch)
treef19b5268d909849a53b152195402a2015387e8ff /llvm/lib/Target/XCore/XCoreISelLowering.cpp
parentbc7d817c225f9e6df34b5d5a8276b45985e08ce3 (diff)
downloadbcm5719-llvm-080f6976c0d0f322f60f2f72e2ab47a480da1811.tar.gz
bcm5719-llvm-080f6976c0d0f322f60f2f72e2ab47a480da1811.zip
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 llvm-svn: 311435
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreISelLowering.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
index f9ead4e67d7..0ac5ecfa7e8 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
@@ -1046,7 +1046,7 @@ XCoreTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
switch (CallConv)
{
default:
- llvm_unreachable("Unsupported calling convention");
+ report_fatal_error("Unsupported calling convention");
case CallingConv::Fast:
case CallingConv::C:
return LowerCCCCallTo(Chain, Callee, CallConv, isVarArg, isTailCall,
@@ -1243,7 +1243,7 @@ SDValue XCoreTargetLowering::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,
OpenPOWER on IntegriCloud