[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:17:34 PST 2024
https://github.com/hatoo created https://github.com/llvm/llvm-project/pull/121112
A return type of `emitc.func` must be specified with `->` instead of `:`.
I've verified the syntax using `mlir-translate --mlir-to-cpp`.
>From c8241c12032698b55ee5cf249b35377586446e94 Mon Sep 17 00:00:00 2001
From: hatoo <hato2000 at gmail.com>
Date: Thu, 26 Dec 2024 00:10:40 +0900
Subject: [PATCH] [mlir][emitc] Fix invalid syntax in example of emitc.return
---
mlir/include/mlir/Dialect/EmitC/IR/EmitC.td | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
}
More information about the Mlir-commits
mailing list