Skip to content

Commit

Permalink
[mlir][nfc] Allow ops to have operands/attributes named context.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chsigg authored and tru committed Sep 5, 2023
1 parent dccf183 commit 092b6c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlir/include/mlir/IR/OperationSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 092b6c5

Please sign in to comment.