mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-05 03:19:11 +00:00
[CodeGen] Report error rather than crash when unable to makeLibCall.
Also, make the assumption explicit in the header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5cb4112882
commit
f55b1a5be4
@ -2030,6 +2030,7 @@ public:
|
||||
ISD::CondCode &CCCode, SDLoc DL) const;
|
||||
|
||||
/// Returns a pair of (return value, chain).
|
||||
/// It is an error to pass RTLIB::UNKNOWN_LIBCALL as \p LC.
|
||||
std::pair<SDValue, SDValue> makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC,
|
||||
EVT RetVT, const SDValue *Ops,
|
||||
unsigned NumOps, bool isSigned,
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user