@@ -35,8 +35,8 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
35
35
36
36
llvmStructType.def_classmethod (
37
37
" get_literal" ,
38
- [](nb::object cls, const std::vector<MlirType> &elements, bool packed ,
39
- MlirLocation loc) {
38
+ [](const nb::object & cls, const std::vector<MlirType> &elements,
39
+ bool packed, MlirLocation loc) {
40
40
CollectDiagnosticsToStringScope scope (mlirLocationGetContext (loc));
41
41
42
42
MlirType type = mlirLLVMStructTypeLiteralGetChecked (
@@ -51,15 +51,15 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
51
51
52
52
llvmStructType.def_classmethod (
53
53
" get_identified" ,
54
- [](nb::object cls, const std::string &name, MlirContext context) {
54
+ [](const nb::object & cls, const std::string &name, MlirContext context) {
55
55
return cls (mlirLLVMStructTypeIdentifiedGet (
56
56
context, mlirStringRefCreate (name.data (), name.size ())));
57
57
},
58
58
" cls" _a, " name" _a, nb::kw_only (), " context" _a.none () = nb::none ());
59
59
60
60
llvmStructType.def_classmethod (
61
61
" get_opaque" ,
62
- [](nb::object cls, const std::string &name, MlirContext context) {
62
+ [](const nb::object & cls, const std::string &name, MlirContext context) {
63
63
return cls (mlirLLVMStructTypeOpaqueGet (
64
64
context, mlirStringRefCreate (name.data (), name.size ())));
65
65
},
@@ -79,7 +79,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
79
79
80
80
llvmStructType.def_classmethod (
81
81
" new_identified" ,
82
- [](nb::object cls, const std::string &name,
82
+ [](const nb::object & cls, const std::string &name,
83
83
const std::vector<MlirType> &elements, bool packed, MlirContext ctx) {
84
84
return cls (mlirLLVMStructTypeIdentifiedNewGet (
85
85
ctx, mlirStringRefCreate (name.data (), name.length ()),
@@ -123,7 +123,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
123
123
mlir_type_subclass (m, " PointerType" , mlirTypeIsALLVMPointerType)
124
124
.def_classmethod (
125
125
" get" ,
126
- [](nb::object cls, std::optional<unsigned > addressSpace,
126
+ [](const nb::object & cls, std::optional<unsigned > addressSpace,
127
127
MlirContext context) {
128
128
CollectDiagnosticsToStringScope scope (context);
129
129
MlirType type = mlirLLVMPointerTypeGet (
0 commit comments