diff options
author | Christian Sigg <csigg@google.com> | 2023-08-30 12:23:25 +0200 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2023-09-05 09:24:20 +0200 |
commit | 092b6c5ee3707ea10b9f10d0a674e8d12395369b (patch) | |
tree | affa8871f611bdbd258929c2892ab999cb886e26 | |
parent | dccf183bb26073c6b818ea24ec31ff87563d73e2 (diff) | |
download | llvm-092b6c5ee3707ea10b9f10d0a674e8d12395369b.zip llvm-092b6c5ee3707ea10b9f10d0a674e8d12395369b.tar.gz llvm-092b6c5ee3707ea10b9f10d0a674e8d12395369b.tar.bz2 |
[mlir][nfc] Allow ops to have operands/attributes named `context`.llvmorg-17.0.0-rc4
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
-rw-r--r-- | mlir/include/mlir/IR/OperationSupport.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h index f3a79eb..adae356 100644 --- a/mlir/include/mlir/IR/OperationSupport.h +++ b/mlir/include/mlir/IR/OperationSupport.h @@ -555,7 +555,7 @@ public: 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 @@ public: 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); } } |