Skip to content

Commit a2914e0

Browse files
committed
[mlir][Python] Fix comments of 'getCapsule' and 'createFromCapsule'
The `getCapsule` and `createFromCapsule` comments incorrectly state the `PyMlirContext` and `MlirContext` in `PyLocation`, `PyAttribute`, and `PyType` classes. Differential Revision: https://reviews.llvm.org/D95413
1 parent 8c7fdc4 commit a2914e0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

mlir/lib/Bindings/Python/IRModules.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,12 @@ class PyLocation : public BaseContextObject {
317317
void contextExit(pybind11::object excType, pybind11::object excVal,
318318
pybind11::object excTb);
319319

320-
/// Gets a capsule wrapping the void* within the MlirContext.
320+
/// Gets a capsule wrapping the void* within the MlirLocation.
321321
pybind11::object getCapsule();
322322

323-
/// Creates a PyMlirContext from the MlirContext wrapped by a capsule.
324-
/// Note that PyMlirContext instances are uniqued, so the returned object
325-
/// may be a pre-existing object. Ownership of the underlying MlirContext
323+
/// Creates a PyLocation from the MlirLocation wrapped by a capsule.
324+
/// Note that PyLocation instances are uniqued, so the returned object
325+
/// may be a pre-existing object. Ownership of the underlying MlirLocation
326326
/// is taken by calling this function.
327327
static PyLocation createFromCapsule(pybind11::object capsule);
328328

@@ -597,12 +597,12 @@ class PyAttribute : public BaseContextObject {
597597
operator MlirAttribute() const { return attr; }
598598
MlirAttribute get() const { return attr; }
599599

600-
/// Gets a capsule wrapping the void* within the MlirContext.
600+
/// Gets a capsule wrapping the void* within the MlirAttribute.
601601
pybind11::object getCapsule();
602602

603-
/// Creates a PyMlirContext from the MlirContext wrapped by a capsule.
604-
/// Note that PyMlirContext instances are uniqued, so the returned object
605-
/// may be a pre-existing object. Ownership of the underlying MlirContext
603+
/// Creates a PyAttribute from the MlirAttribute wrapped by a capsule.
604+
/// Note that PyAttribute instances are uniqued, so the returned object
605+
/// may be a pre-existing object. Ownership of the underlying MlirAttribute
606606
/// is taken by calling this function.
607607
static PyAttribute createFromCapsule(pybind11::object capsule);
608608

@@ -643,12 +643,12 @@ class PyType : public BaseContextObject {
643643
operator MlirType() const { return type; }
644644
MlirType get() const { return type; }
645645

646-
/// Gets a capsule wrapping the void* within the MlirContext.
646+
/// Gets a capsule wrapping the void* within the MlirType.
647647
pybind11::object getCapsule();
648648

649-
/// Creates a PyMlirContext from the MlirContext wrapped by a capsule.
650-
/// Note that PyMlirContext instances are uniqued, so the returned object
651-
/// may be a pre-existing object. Ownership of the underlying MlirContext
649+
/// Creates a PyType from the MlirType wrapped by a capsule.
650+
/// Note that PyType instances are uniqued, so the returned object
651+
/// may be a pre-existing object. Ownership of the underlying MlirType
652652
/// is taken by calling this function.
653653
static PyType createFromCapsule(pybind11::object capsule);
654654

0 commit comments

Comments
 (0)