From 96cf183bccd7d1c3083f169a89a6af1f263b3aae Mon Sep 17 00:00:00 2001 From: Jeff Niu Date: Thu, 8 Dec 2022 21:32:26 -0800 Subject: [PATCH] [mlir] Fix examples build Missing two extra parameters. --- mlir/examples/toy/Ch2/mlir/Dialect.cpp | 3 ++- mlir/examples/toy/Ch3/mlir/Dialect.cpp | 3 ++- mlir/examples/toy/Ch4/mlir/Dialect.cpp | 3 ++- mlir/examples/toy/Ch5/mlir/Dialect.cpp | 3 ++- mlir/examples/toy/Ch6/mlir/Dialect.cpp | 3 ++- mlir/examples/toy/Ch7/mlir/Dialect.cpp | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mlir/examples/toy/Ch2/mlir/Dialect.cpp b/mlir/examples/toy/Ch2/mlir/Dialect.cpp index 201f9c7..a6ccbbf 100644 --- a/mlir/examples/toy/Ch2/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch2/mlir/Dialect.cpp @@ -212,7 +212,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { diff --git a/mlir/examples/toy/Ch3/mlir/Dialect.cpp b/mlir/examples/toy/Ch3/mlir/Dialect.cpp index 4bd1055..913979a 100644 --- a/mlir/examples/toy/Ch3/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch3/mlir/Dialect.cpp @@ -199,7 +199,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { diff --git a/mlir/examples/toy/Ch4/mlir/Dialect.cpp b/mlir/examples/toy/Ch4/mlir/Dialect.cpp index 3a02ea3..5db2f95 100644 --- a/mlir/examples/toy/Ch4/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch4/mlir/Dialect.cpp @@ -288,7 +288,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { diff --git a/mlir/examples/toy/Ch5/mlir/Dialect.cpp b/mlir/examples/toy/Ch5/mlir/Dialect.cpp index 49ce3d9..c2015ee 100644 --- a/mlir/examples/toy/Ch5/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch5/mlir/Dialect.cpp @@ -288,7 +288,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { diff --git a/mlir/examples/toy/Ch6/mlir/Dialect.cpp b/mlir/examples/toy/Ch6/mlir/Dialect.cpp index 49ce3d9..c2015ee 100644 --- a/mlir/examples/toy/Ch6/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch6/mlir/Dialect.cpp @@ -288,7 +288,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { diff --git a/mlir/examples/toy/Ch7/mlir/Dialect.cpp b/mlir/examples/toy/Ch7/mlir/Dialect.cpp index cb65a95..ffcdd7a 100644 --- a/mlir/examples/toy/Ch7/mlir/Dialect.cpp +++ b/mlir/examples/toy/Ch7/mlir/Dialect.cpp @@ -315,7 +315,8 @@ mlir::ParseResult FuncOp::parse(mlir::OpAsmParser &parser, return mlir::function_interface_impl::parseFunctionOp( parser, result, /*allowVariadic=*/false, - getFunctionTypeAttrName(result.name), buildFuncType); + getFunctionTypeAttrName(result.name), buildFuncType, + getArgAttrsAttrName(result.name), getResAttrsAttrName(result.name)); } void FuncOp::print(mlir::OpAsmPrinter &p) { -- 2.7.4