[Mlir-commits] [mlir] [tblgen] Add command line flags for using fallback TypeIDs in generation (PR #125767)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 4 14:10:29 PST 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 2a84e1e65ad7f84c2dbcf37241a7d1805a523e0d 2e41a67c262ff38fe1d17500c39ae67f43102eb3 --extensions cpp -- mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
index 954e1ce378..9109c549df 100644
--- a/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
+++ b/mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
@@ -32,7 +32,9 @@ using llvm::RecordKeeper;
 static llvm::cl::OptionCategory clAttrOrTypeDefs("Options for -gen-*def-*");
 
 static llvm::cl::opt<bool> clUseFallbackTypeIDs(
-    "gen-attr-or-type-use-fallback-type-ids", llvm::cl::desc("Don't generate static TypeID decls; fall back to string comparison."),
+    "gen-attr-or-type-use-fallback-type-ids",
+    llvm::cl::desc(
+        "Don't generate static TypeID decls; fall back to string comparison."),
     llvm::cl::init(false), llvm::cl::cat(clAttrOrTypeDefs));
 
 //===----------------------------------------------------------------------===//
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index 1e37ec2f9f..79b9a0e2ab 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -237,7 +237,9 @@ static const char *const opCommentHeader = R"(
 static llvm::cl::OptionCategory clOpDefs("Options for op definitions");
 
 static llvm::cl::opt<bool> clUseFallbackTypeIDs(
-    "gen-op-use-fallback-type-ids", llvm::cl::desc("Don't generate static TypeID decls; fall back to string comparison."),
+    "gen-op-use-fallback-type-ids",
+    llvm::cl::desc(
+        "Don't generate static TypeID decls; fall back to string comparison."),
     llvm::cl::init(false), llvm::cl::cat(clOpDefs));
 
 //===----------------------------------------------------------------------===//

``````````

</details>


https://github.com/llvm/llvm-project/pull/125767


More information about the Mlir-commits mailing list