File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
mlir/include/mlir/Dialect/LLVMIR Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -558,10 +558,13 @@ def LLVM_ResumeOp : LLVM_TerminatorOp<"resume", []> {
558558 let arguments = (ins LLVM_Type:$value);
559559 string llvmBuilder = [{ builder.CreateResume($value); }];
560560 let verifier = [{
561- if (!isa_and_nonnull<LandingpadOp>(value().getDefiningOp()))
562- return emitOpError("expects landingpad value as operand");
561+ Value v = value();
563562 // No check for personality of function - landingpad op verifies it.
564- return success();
563+ if (isa_and_nonnull<LandingpadOp>(v.getDefiningOp()))
564+ return success();
565+ if (v && v.isa<BlockArgument>())
566+ return success();
567+ return emitOpError("expects landingpad value as operand");
565568 }];
566569
567570 let assemblyFormat = "$value attr-dict `:` type($value)";
You can’t perform that action at this time.
0 commit comments