Skip to content

Commit d13f40f

Browse files
committed
[MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectLLVM.cpp (NFC)
1 parent 9b493dc commit d13f40f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/lib/Bindings/Python/DialectLLVM.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
3535

3636
llvmStructType.def_classmethod(
3737
"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) {
4040
CollectDiagnosticsToStringScope scope(mlirLocationGetContext(loc));
4141

4242
MlirType type = mlirLLVMStructTypeLiteralGetChecked(
@@ -51,15 +51,15 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
5151

5252
llvmStructType.def_classmethod(
5353
"get_identified",
54-
[](nb::object cls, const std::string &name, MlirContext context) {
54+
[](const nb::object &cls, const std::string &name, MlirContext context) {
5555
return cls(mlirLLVMStructTypeIdentifiedGet(
5656
context, mlirStringRefCreate(name.data(), name.size())));
5757
},
5858
"cls"_a, "name"_a, nb::kw_only(), "context"_a.none() = nb::none());
5959

6060
llvmStructType.def_classmethod(
6161
"get_opaque",
62-
[](nb::object cls, const std::string &name, MlirContext context) {
62+
[](const nb::object &cls, const std::string &name, MlirContext context) {
6363
return cls(mlirLLVMStructTypeOpaqueGet(
6464
context, mlirStringRefCreate(name.data(), name.size())));
6565
},
@@ -79,7 +79,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
7979

8080
llvmStructType.def_classmethod(
8181
"new_identified",
82-
[](nb::object cls, const std::string &name,
82+
[](const nb::object &cls, const std::string &name,
8383
const std::vector<MlirType> &elements, bool packed, MlirContext ctx) {
8484
return cls(mlirLLVMStructTypeIdentifiedNewGet(
8585
ctx, mlirStringRefCreate(name.data(), name.length()),
@@ -123,7 +123,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
123123
mlir_type_subclass(m, "PointerType", mlirTypeIsALLVMPointerType)
124124
.def_classmethod(
125125
"get",
126-
[](nb::object cls, std::optional<unsigned> addressSpace,
126+
[](const nb::object &cls, std::optional<unsigned> addressSpace,
127127
MlirContext context) {
128128
CollectDiagnosticsToStringScope scope(context);
129129
MlirType type = mlirLLVMPointerTypeGet(

0 commit comments

Comments
 (0)