[Mlir-commits] [mlir] d13f40f - [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectLLVM.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Aug 23 07:57:00 PDT 2025
Author: Mehdi Amini
Date: 2025-08-23T07:56:15-07:00
New Revision: d13f40f386b4c4db15f232c5cfb105d362b84fe2
URL: https://github.com/llvm/llvm-project/commit/d13f40f386b4c4db15f232c5cfb105d362b84fe2
DIFF: https://github.com/llvm/llvm-project/commit/d13f40f386b4c4db15f232c5cfb105d362b84fe2.diff
LOG: [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectLLVM.cpp (NFC)
Added:
Modified:
mlir/lib/Bindings/Python/DialectLLVM.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/DialectLLVM.cpp b/mlir/lib/Bindings/Python/DialectLLVM.cpp
index 7df66c70e073f..ee106c0321669 100644
--- a/mlir/lib/Bindings/Python/DialectLLVM.cpp
+++ b/mlir/lib/Bindings/Python/DialectLLVM.cpp
@@ -35,8 +35,8 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
llvmStructType.def_classmethod(
"get_literal",
- [](nb::object cls, const std::vector<MlirType> &elements, bool packed,
- MlirLocation loc) {
+ [](const nb::object &cls, const std::vector<MlirType> &elements,
+ bool packed, MlirLocation loc) {
CollectDiagnosticsToStringScope scope(mlirLocationGetContext(loc));
MlirType type = mlirLLVMStructTypeLiteralGetChecked(
@@ -51,7 +51,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
llvmStructType.def_classmethod(
"get_identified",
- [](nb::object cls, const std::string &name, MlirContext context) {
+ [](const nb::object &cls, const std::string &name, MlirContext context) {
return cls(mlirLLVMStructTypeIdentifiedGet(
context, mlirStringRefCreate(name.data(), name.size())));
},
@@ -59,7 +59,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
llvmStructType.def_classmethod(
"get_opaque",
- [](nb::object cls, const std::string &name, MlirContext context) {
+ [](const nb::object &cls, const std::string &name, MlirContext context) {
return cls(mlirLLVMStructTypeOpaqueGet(
context, mlirStringRefCreate(name.data(), name.size())));
},
@@ -79,7 +79,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
llvmStructType.def_classmethod(
"new_identified",
- [](nb::object cls, const std::string &name,
+ [](const nb::object &cls, const std::string &name,
const std::vector<MlirType> &elements, bool packed, MlirContext ctx) {
return cls(mlirLLVMStructTypeIdentifiedNewGet(
ctx, mlirStringRefCreate(name.data(), name.length()),
@@ -123,7 +123,7 @@ static void populateDialectLLVMSubmodule(const nanobind::module_ &m) {
mlir_type_subclass(m, "PointerType", mlirTypeIsALLVMPointerType)
.def_classmethod(
"get",
- [](nb::object cls, std::optional<unsigned> addressSpace,
+ [](const nb::object &cls, std::optional<unsigned> addressSpace,
MlirContext context) {
CollectDiagnosticsToStringScope scope(context);
MlirType type = mlirLLVMPointerTypeGet(
More information about the Mlir-commits
mailing list