File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4273,14 +4273,15 @@ LogicalResult scf::IndexSwitchOp::verify() {
42734273 << " see yield operation here" ;
42744274 }
42754275 for (auto [idx, result, operand] :
4276- llvm::zip (llvm::seq<unsigned >(0 , getNumResults ()), getResultTypes (),
4277- yield.getOperandTypes ())) {
4278- if (result == operand)
4276+ llvm::enumerate (getResultTypes (), yield.getOperands ())) {
4277+ if (!operand)
4278+ return yield.emitOpError () << " operand " << idx << " is null\n " ;
4279+ if (result == operand.getType ())
42794280 continue ;
42804281 return (emitOpError (" expected result #" )
42814282 << idx << " of each region to be " << result)
42824283 .attachNote (yield.getLoc ())
4283- << name << " returns " << operand << " here" ;
4284+ << name << " returns " << operand. getType () << " here" ;
42844285 }
42854286 return success ();
42864287 };
You can’t perform that action at this time.
0 commit comments