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", []> {
558
558
let arguments = (ins LLVM_Type:$value);
559
559
string llvmBuilder = [{ builder.CreateResume($value); }];
560
560
let verifier = [{
561
- if (!isa_and_nonnull<LandingpadOp>(value().getDefiningOp()))
562
- return emitOpError("expects landingpad value as operand");
561
+ Value v = value();
563
562
// 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");
565
568
}];
566
569
567
570
let assemblyFormat = "$value attr-dict `:` type($value)";
You can’t perform that action at this time.
0 commit comments