Skip to content

Commit cbff02b

Browse files
authored
[mlir][emitc] Fix invalid syntax in example of emitc.return (#121112)
A return type of `emitc.func` must be specified with `->` instead of `:`. I've verified the syntax using `mlir-translate --mlir-to-cpp`.
1 parent 7326e90 commit cbff02b

File tree

1 file changed

+1
-1
lines changed
  • mlir/include/mlir/Dialect/EmitC/IR

1 file changed

+1
-1
lines changed

mlir/include/mlir/Dialect/EmitC/IR/EmitC.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def EmitC_ReturnOp : EmitC_Op<"return", [Pure, HasParent<"FuncOp">,
727727
Example:
728728

729729
```mlir
730-
emitc.func @foo() : (i32) {
730+
emitc.func @foo() -> (i32) {
731731
...
732732
emitc.return %0 : i32
733733
}

0 commit comments

Comments
 (0)