@@ -3275,12 +3275,13 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
32753275
32763276 // Deopt and ptrauth bundles are lowered in helper functions, and we don't
32773277 // have to do anything here to lower funclet bundles.
3278- assert (!I.hasOperandBundlesOtherThan (
3279- {LLVMContext::OB_deopt, LLVMContext::OB_gc_transition,
3280- LLVMContext::OB_gc_live, LLVMContext::OB_funclet,
3281- LLVMContext::OB_cfguardtarget, LLVMContext::OB_ptrauth,
3282- LLVMContext::OB_clang_arc_attachedcall}) &&
3283- " Cannot lower invokes with arbitrary operand bundles yet!" );
3278+ if (I.hasOperandBundlesOtherThan (
3279+ {LLVMContext::OB_deopt, LLVMContext::OB_gc_transition,
3280+ LLVMContext::OB_gc_live, LLVMContext::OB_funclet,
3281+ LLVMContext::OB_cfguardtarget, LLVMContext::OB_ptrauth,
3282+ LLVMContext::OB_clang_arc_attachedcall}))
3283+ reportFatalUsageError (
3284+ " cannot lower invokes with arbitrary operand bundles!" );
32843285
32853286 const Value *Callee (I.getCalledOperand ());
32863287 const Function *Fn = dyn_cast<Function>(Callee);
@@ -3380,9 +3381,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
33803381
33813382 // Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
33823383 // have to do anything here to lower funclet bundles.
3383- assert (!I.hasOperandBundlesOtherThan (
3384- {LLVMContext::OB_deopt, LLVMContext::OB_funclet}) &&
3385- " Cannot lower callbrs with arbitrary operand bundles yet!" );
3384+ if (I.hasOperandBundlesOtherThan (
3385+ {LLVMContext::OB_deopt, LLVMContext::OB_funclet}))
3386+ reportFatalUsageError (
3387+ " cannot lower callbrs with arbitrary operand bundles!" );
33863388
33873389 assert (I.isInlineAsm () && " Only know how to handle inlineasm callbr" );
33883390 visitInlineAsm (I);
@@ -9549,12 +9551,12 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
95499551 // Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
95509552 // have to do anything here to lower funclet bundles.
95519553 // CFGuardTarget bundles are lowered in LowerCallTo.
9552- assert (! I.hasOperandBundlesOtherThan (
9553- {LLVMContext::OB_deopt, LLVMContext::OB_funclet,
9554- LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated,
9555- LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi,
9556- LLVMContext::OB_convergencectrl}) &&
9557- " Cannot lower calls with arbitrary operand bundles!" );
9554+ if ( I.hasOperandBundlesOtherThan (
9555+ {LLVMContext::OB_deopt, LLVMContext::OB_funclet,
9556+ LLVMContext::OB_cfguardtarget, LLVMContext::OB_preallocated,
9557+ LLVMContext::OB_clang_arc_attachedcall, LLVMContext::OB_kcfi,
9558+ LLVMContext::OB_convergencectrl}))
9559+ reportFatalUsageError ( " cannot lower calls with arbitrary operand bundles!" );
95589560
95599561 SDValue Callee = getValue (I.getCalledOperand ());
95609562
0 commit comments