diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-03-26 22:46:58 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-03-26 22:46:58 +0000 |
| commit | e85a2d34c674d022451bd228c64fa9a8ae580770 (patch) | |
| tree | 55dd5109d98fc3711fc019e79ddfbef918e5b53d /llvm/lib/CodeGen | |
| parent | 2721f62d504631f2bec593e577a8bd71b7615777 (diff) | |
| download | bcm5719-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.cpp | 2 |
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()); |

