@@ -3275,12 +3275,13 @@ void SelectionDAGBuilder::visitInvoke(const InvokeInst &I) {
3275
3275
3276
3276
// Deopt and ptrauth bundles are lowered in helper functions, and we don't
3277
3277
// 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!" );
3284
3285
3285
3286
const Value *Callee (I.getCalledOperand ());
3286
3287
const Function *Fn = dyn_cast<Function>(Callee);
@@ -3380,9 +3381,10 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
3380
3381
3381
3382
// Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
3382
3383
// 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!" );
3386
3388
3387
3389
assert (I.isInlineAsm () && " Only know how to handle inlineasm callbr" );
3388
3390
visitInlineAsm (I);
@@ -9549,12 +9551,12 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
9549
9551
// Deopt bundles are lowered in LowerCallSiteWithDeoptBundle, and we don't
9550
9552
// have to do anything here to lower funclet bundles.
9551
9553
// 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!" );
9558
9560
9559
9561
SDValue Callee = getValue (I.getCalledOperand ());
9560
9562
0 commit comments