[Mlir-commits] [mlir] b84f95f - [mlir] Fix -Wunused-private-field in the Transform dialect
Alex Zinenko
llvmlistbot at llvm.org
Tue Apr 26 05:05:33 PDT 2022
Author: Alex Zinenko
Date: 2022-04-26T14:05:24+02:00
New Revision: b84f95fe5348ac97d33ffd2f6845b7f1b17b389c
URL: https://github.com/llvm/llvm-project/commit/b84f95fe5348ac97d33ffd2f6845b7f1b17b389c
DIFF: https://github.com/llvm/llvm-project/commit/b84f95fe5348ac97d33ffd2f6845b7f1b17b389c.diff
LOG: [mlir] Fix -Wunused-private-field in the Transform dialect
Classes derived from TransformState::Extension may need access to the
parent state.
Added:
Modified:
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
index 1d0c6baa36383..b4c8ada4e643b 100644
--- a/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
+++ b/mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
@@ -182,6 +182,9 @@ class TransformState {
/// Constructs an extension of the given TransformState object.
Extension(TransformState &state) : state(state) {}
+ /// Provides read-only access to the parent TransformState object.
+ const TransformState &getTransformState() const { return state; }
+
private:
/// Back-reference to the state that is being extended.
TransformState &state;
More information about the Mlir-commits
mailing list