Skip to content

Commit 11bbc44

Browse files
committed
[mlir][examples] Fix deprecation warnings for ArrayRef(std::nullopt)
1 parent 56ef00a commit 11bbc44

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

mlir/examples/toy/Ch2/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
297297

298298
// Allow building a ReturnOp with no return operand.
299299
let builders = [
300-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
300+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
301301
];
302302

303303
// Provide extra utility definitions on the c++ operation class definition.

mlir/examples/toy/Ch3/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
298298

299299
// Allow building a ReturnOp with no return operand.
300300
let builders = [
301-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
301+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
302302
];
303303

304304
// Provide extra utility definitions on the c++ operation class definition.

mlir/examples/toy/Ch4/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
335335

336336
// Allow building a ReturnOp with no return operand.
337337
let builders = [
338-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
338+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
339339
];
340340

341341
// Provide extra utility definitions on the c++ operation class definition.

mlir/examples/toy/Ch5/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
335335

336336
// Allow building a ReturnOp with no return operand.
337337
let builders = [
338-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
338+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
339339
];
340340

341341
// Provide extra utility definitions on the c++ operation class definition.

mlir/examples/toy/Ch6/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
335335

336336
// Allow building a ReturnOp with no return operand.
337337
let builders = [
338-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
338+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
339339
];
340340

341341
// Provide extra utility definitions on the c++ operation class definition.

mlir/examples/toy/Ch7/include/toy/Ops.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def ReturnOp : Toy_Op<"return", [Pure, HasParent<"FuncOp">,
360360

361361
// Allow building a ReturnOp with no return operand.
362362
let builders = [
363-
OpBuilder<(ins), [{ build($_builder, $_state, std::nullopt); }]>
363+
OpBuilder<(ins), [{ build($_builder, $_state, {}); }]>
364364
];
365365

366366
// Provide extra utility definitions on the c++ operation class definition.

0 commit comments

Comments
 (0)