[Mlir-commits] [mlir] [mlir][bytecode] Add support for deferred attribute/type parsing. (PR #170993)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Dec 6 10:49:52 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 origin/main HEAD --extensions cpp,h -- mlir/include/mlir/Bytecode/BytecodeImplementation.h mlir/lib/Bytecode/Reader/BytecodeReader.cpp mlir/unittests/Bytecode/BytecodeTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/include/mlir/Bytecode/BytecodeImplementation.h b/mlir/include/mlir/Bytecode/BytecodeImplementation.h
index 65e7d23fa..eb5afa4d5 100644
--- a/mlir/include/mlir/Bytecode/BytecodeImplementation.h
+++ b/mlir/include/mlir/Bytecode/BytecodeImplementation.h
@@ -109,7 +109,8 @@ public:
/// Typed version of getOrDeferParsingAttribute. Returns the attribute cast
/// to the specified type, or nullptr if not resolved or cast fails.
- template <typename T> T getOrDeferParsingAttribute() {
+ template <typename T>
+ T getOrDeferParsingAttribute() {
return llvm::dyn_cast_or_null<T>(getOrDeferParsingAttribute());
}
@@ -149,7 +150,8 @@ public:
/// Typed version of getOrDeferParsingType. Returns the type cast
/// to the specified type, or nullptr if not resolved or cast fails.
- template <typename T> T getOrDeferParsingType() {
+ template <typename T>
+ T getOrDeferParsingType() {
return llvm::dyn_cast_or_null<T>(getOrDeferParsingType());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/170993
More information about the Mlir-commits
mailing list