summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-03-26 22:46:58 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-03-26 22:46:58 +0000
commite85a2d34c674d022451bd228c64fa9a8ae580770 (patch)
tree55dd5109d98fc3711fc019e79ddfbef918e5b53d /llvm/lib/CodeGen
parent2721f62d504631f2bec593e577a8bd71b7615777 (diff)
downloadbcm5719-llvm-e85a2d34c674d022451bd228c64fa9a8ae580770.tar.gz
bcm5719-llvm-e85a2d34c674d022451bd228c64fa9a8ae580770.zip
[CodeGen] Report error rather than crash when unable to makeLibCall.
Also, make the assumption explicit in the header. llvm-svn: 233329
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index c382fe0d6fb..ddbf0b2dd53 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -100,6 +100,8 @@ TargetLowering::makeLibCall(SelectionDAG &DAG,
Entry.isZExt = !shouldSignExtendTypeInLibCall(Ops[i].getValueType(), isSigned);
Args.push_back(Entry);
}
+ if (LC == RTLIB::UNKNOWN_LIBCALL)
+ report_fatal_error("Unsupported library call operation!");
SDValue Callee = DAG.getExternalSymbol(getLibcallName(LC), getPointerTy());
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
OpenPOWER on IntegriCloud