[Mlir-commits] [mlir] [mlir][emitc] Fix invalid syntax in example of emitc.return (PR #121112)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Dec 25 07:18:29 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
@llvm/pr-subscribers-mlir-emitc
Author: None (hatoo)
<details>
<summary>Changes</summary>
A return type of `emitc.func` must be specified with `->` instead of `:`.
I've verified the syntax using `mlir-translate --mlir-to-cpp`.
---
Full diff: https://github.com/llvm/llvm-project/pull/121112.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/EmitC/IR/EmitC.td (+1-1)
``````````diff
diff --git a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
index fc5a33541533a7..74c5218df58a28 100644
--- a/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
+++ b/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td
@@ -727,7 +727,7 @@ def EmitC_ReturnOp : EmitC_Op<"return", [Pure, HasParent<"FuncOp">,
Example:
```mlir
- emitc.func @foo() : (i32) {
+ emitc.func @foo() -> (i32) {
...
emitc.return %0 : i32
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/121112
More information about the Mlir-commits
mailing list