diff --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td index 1011e0d7ef68..d7ff8b6352bb 100644 --- a/mlir/include/mlir/Dialect/SCF/SCFOps.td +++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td @@ -251,15 +251,15 @@ def IfOp : SCF_Op<"if", ]; let extraClassDeclaration = [{ - OpBuilder getThenBodyBuilder() { + OpBuilder getThenBodyBuilder(OpBuilder::Listener *listener = nullptr) { Block* body = getBody(0); - return results().empty() ? OpBuilder::atBlockTerminator(body) - : OpBuilder::atBlockEnd(body); + return results().empty() ? OpBuilder::atBlockTerminator(body, listener) + : OpBuilder::atBlockEnd(body, listener); } - OpBuilder getElseBodyBuilder() { + OpBuilder getElseBodyBuilder(OpBuilder::Listener *listener = nullptr) { Block* body = getBody(1); - return results().empty() ? OpBuilder::atBlockTerminator(body) - : OpBuilder::atBlockEnd(body); + return results().empty() ? OpBuilder::atBlockTerminator(body, listener) + : OpBuilder::atBlockEnd(body, listener); } }]; }