[Mlir-commits] [mlir] 900e6fc - [mlir][nfc] Allow ops to have operands/attributes named `context`.
Christian Sigg
llvmlistbot at llvm.org
Sun Sep 3 22:33:11 PDT 2023
Author: Christian Sigg
Date: 2023-09-04T07:33:03+02:00
New Revision: 900e6fcf982a37438546da77f04de17d3c454a11
URL: https://github.com/llvm/llvm-project/commit/900e6fcf982a37438546da77f04de17d3c454a11
DIFF: https://github.com/llvm/llvm-project/commit/900e6fcf982a37438546da77f04de17d3c454a11.diff
LOG: [mlir][nfc] Allow ops to have operands/attributes named `context`.
This is probably a bad idea, but it's only become a problem with properties and is easy to fix.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D159185
Added:
Modified:
mlir/include/mlir/IR/OperationSupport.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h
index b33a861a92021c8..8519c703a134e4b 100644
--- a/mlir/include/mlir/IR/OperationSupport.h
+++ b/mlir/include/mlir/IR/OperationSupport.h
@@ -555,7 +555,7 @@ class RegisteredOperationName : public OperationName {
StringRef name) final {
if constexpr (hasProperties) {
auto concreteOp = cast<ConcreteOp>(op);
- return ConcreteOp::getInherentAttr(concreteOp.getContext(),
+ return ConcreteOp::getInherentAttr(concreteOp->getContext(),
concreteOp.getProperties(), name);
}
// If the op does not have support for properties, we dispatch back to the
@@ -576,7 +576,7 @@ class RegisteredOperationName : public OperationName {
void populateInherentAttrs(Operation *op, NamedAttrList &attrs) final {
if constexpr (hasProperties) {
auto concreteOp = cast<ConcreteOp>(op);
- ConcreteOp::populateInherentAttrs(concreteOp.getContext(),
+ ConcreteOp::populateInherentAttrs(concreteOp->getContext(),
concreteOp.getProperties(), attrs);
}
}
More information about the Mlir-commits
mailing list