[mlir] fix compiler error due to commit landing race

This commit is contained in:
Alex Zinenko 2022-06-14 18:04:00 +02:00
parent e3890b7fd6
commit 069ca6f7a3

View File

@ -123,8 +123,8 @@ LogicalResult PatternApplicatorExtension::findAllMatches(
//===----------------------------------------------------------------------===//
OperandRange
transform::AlternativesOp::getSuccessorEntryOperands(unsigned index) {
if (getOperation()->getNumOperands() == 1)
transform::AlternativesOp::getSuccessorEntryOperands(Optional<unsigned> index) {
if (index.hasValue() && getOperation()->getNumOperands() == 1)
return getOperation()->getOperands();
return OperandRange(getOperation()->operand_end(),
getOperation()->operand_end());