Skip to content

Commit 092b6c5

Browse files
chsiggtru
authored andcommitted
[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
1 parent dccf183 commit 092b6c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/include/mlir/IR/OperationSupport.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ class RegisteredOperationName : public OperationName {
555555
StringRef name) final {
556556
if constexpr (hasProperties) {
557557
auto concreteOp = cast<ConcreteOp>(op);
558-
return ConcreteOp::getInherentAttr(concreteOp.getContext(),
558+
return ConcreteOp::getInherentAttr(concreteOp->getContext(),
559559
concreteOp.getProperties(), name);
560560
}
561561
// If the op does not have support for properties, we dispatch back to the
@@ -576,7 +576,7 @@ class RegisteredOperationName : public OperationName {
576576
void populateInherentAttrs(Operation *op, NamedAttrList &attrs) final {
577577
if constexpr (hasProperties) {
578578
auto concreteOp = cast<ConcreteOp>(op);
579-
ConcreteOp::populateInherentAttrs(concreteOp.getContext(),
579+
ConcreteOp::populateInherentAttrs(concreteOp->getContext(),
580580
concreteOp.getProperties(), attrs);
581581
}
582582
}

0 commit comments

Comments
 (0)