diff --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td --- a/mlir/include/mlir/Dialect/SCF/SCFOps.td +++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td @@ -251,15 +251,15 @@ ]; 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); } }]; }