@@ -29,7 +29,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
29
29
mlirTransformAnyOpTypeGetTypeID);
30
30
anyOpType.def_classmethod (
31
31
" get" ,
32
- [](nb::object cls, MlirContext ctx) {
32
+ [](const nb::object & cls, MlirContext ctx) {
33
33
return cls (mlirTransformAnyOpTypeGet (ctx));
34
34
},
35
35
" Get an instance of AnyOpType in the given context." , nb::arg (" cls" ),
@@ -44,7 +44,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
44
44
mlirTransformAnyParamTypeGetTypeID);
45
45
anyParamType.def_classmethod (
46
46
" get" ,
47
- [](nb::object cls, MlirContext ctx) {
47
+ [](const nb::object & cls, MlirContext ctx) {
48
48
return cls (mlirTransformAnyParamTypeGet (ctx));
49
49
},
50
50
" Get an instance of AnyParamType in the given context." , nb::arg (" cls" ),
@@ -59,7 +59,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
59
59
mlirTransformAnyValueTypeGetTypeID);
60
60
anyValueType.def_classmethod (
61
61
" get" ,
62
- [](nb::object cls, MlirContext ctx) {
62
+ [](const nb::object & cls, MlirContext ctx) {
63
63
return cls (mlirTransformAnyValueTypeGet (ctx));
64
64
},
65
65
" Get an instance of AnyValueType in the given context." , nb::arg (" cls" ),
@@ -74,7 +74,8 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
74
74
mlirTransformOperationTypeGetTypeID);
75
75
operationType.def_classmethod (
76
76
" get" ,
77
- [](nb::object cls, const std::string &operationName, MlirContext ctx) {
77
+ [](const nb::object &cls, const std::string &operationName,
78
+ MlirContext ctx) {
78
79
MlirStringRef cOperationName =
79
80
mlirStringRefCreate (operationName.data (), operationName.size ());
80
81
return cls (mlirTransformOperationTypeGet (ctx, cOperationName));
@@ -101,7 +102,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
101
102
mlirTransformParamTypeGetTypeID);
102
103
paramType.def_classmethod (
103
104
" get" ,
104
- [](nb::object cls, MlirType type, MlirContext ctx) {
105
+ [](const nb::object & cls, MlirType type, MlirContext ctx) {
105
106
return cls (mlirTransformParamTypeGet (ctx, type));
106
107
},
107
108
" Get an instance of ParamType for the given type in the given context." ,
0 commit comments