[llvm-branch-commits] [mlir] 092b6c5 - [mlir][nfc] Allow ops to have operands/attributes named `context`.
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 5 00:24:51 PDT 2023
Author: Christian Sigg
Date: 2023-09-05T09:24:20+02:00
New Revision: 092b6c5ee3707ea10b9f10d0a674e8d12395369b
URL: https://github.com/llvm/llvm-project/commit/092b6c5ee3707ea10b9f10d0a674e8d12395369b
DIFF: https://github.com/llvm/llvm-project/commit/092b6c5ee3707ea10b9f10d0a674e8d12395369b.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 f3a79eb52f8ec0..adae3560570ddc 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 llvm-branch-commits
mailing list