[llvm-branch-commits] [mlir] [mlir][NFC] Move OpFoldResult to mlir/IR/OpFoldResult.h (PR #228740)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Oct 3 09:48:59 PDT 2026
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 h,cpp -- mlir/include/mlir/IR/OpFoldResult.h mlir/lib/IR/OpFoldResult.cpp mlir/include/mlir/IR/OpDefinition.h --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/IR/OpFoldResult.h b/mlir/include/mlir/IR/OpFoldResult.h
index 0bda0e754..c1536869b 100644
--- a/mlir/include/mlir/IR/OpFoldResult.h
+++ b/mlir/include/mlir/IR/OpFoldResult.h
@@ -21,7 +21,6 @@
#include "llvm/Support/Compiler.h"
namespace mlir {
-
/// This class represents a single result from folding an operation.
class OpFoldResult : public PointerUnion<Attribute, Value> {
using PointerUnion<Attribute, Value>::PointerUnion;
@@ -39,11 +38,9 @@ public:
// Temporarily exit the MLIR namespace to add casting support as later code in
// this uses it. The CastInfo must come after the OpFoldResult definition and
// before any cast function calls depending on CastInfo.
-
} // namespace mlir
namespace llvm {
-
// Allow llvm::cast style functions.
template <typename To>
struct CastInfo<To, mlir::OpFoldResult>
@@ -52,14 +49,11 @@ struct CastInfo<To, mlir::OpFoldResult>
template <typename To>
struct CastInfo<To, const mlir::OpFoldResult>
: public CastInfo<To, const mlir::OpFoldResult::PointerUnion> {};
-
} // namespace llvm
namespace mlir {
-
/// Allow printing to a stream.
raw_ostream &operator<<(raw_ostream &os, OpFoldResult ofr);
-
} // namespace mlir
#endif // MLIR_IR_OPFOLDRESULT_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/228740
More information about the llvm-branch-commits
mailing list