Skip to content

Commit 27712ea

Browse files
committed
Add comment about virtual
1 parent 07bd300 commit 27712ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mlir/lib/Bindings/Python/IRModule.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,9 @@ class PyConcreteAttribute : public BaseTy {
11101110
/// bindings so such operation always exists).
11111111
class PyValue {
11121112
public:
1113+
// The virtual here is "load bearing" in that it enables RTTI
1114+
// for PyConcreteValue CRTP classes that support maybeDownCast.
1115+
// See PyValue::maybeDownCast.
11131116
virtual ~PyValue() = default;
11141117
PyValue(PyOperationRef parentOperation, MlirValue value)
11151118
: parentOperation(std::move(parentOperation)), value(value) {}

0 commit comments

Comments
 (0)