[Mlir-commits] [mlir] 30c7c42 - Apply clang-tidy fixes for performance-unnecessary-value-param in IRCore.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Oct 8 11:21:06 PDT 2022
Author: Mehdi Amini
Date: 2022-10-08T18:18:13Z
New Revision: 30c7c423419e6e3b8e878d34b0d8908959019392
URL: https://github.com/llvm/llvm-project/commit/30c7c423419e6e3b8e878d34b0d8908959019392
DIFF: https://github.com/llvm/llvm-project/commit/30c7c423419e6e3b8e878d34b0d8908959019392.diff
LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in IRCore.cpp (NFC)
Added:
Modified:
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/Bindings/Python/IRModule.h
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 389969baa70ca..f706951e6702c 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -1029,7 +1029,7 @@ void PyOperationBase::print(py::object fileObject, bool binary,
mlirOpPrintingFlagsDestroy(flags);
}
-void PyOperationBase::writeBytecode(py::object fileObject) {
+void PyOperationBase::writeBytecode(const py::object &fileObject) {
PyOperation &operation = getOperation();
operation.checkValid();
PyFileAccumulator accum(fileObject, /*binary=*/true);
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h
index ad783c6c37b85..4738a6fae78cf 100644
--- a/mlir/lib/Bindings/Python/IRModule.h
+++ b/mlir/lib/Bindings/Python/IRModule.h
@@ -513,7 +513,7 @@ class PyOperationBase {
bool assumeVerified);
// Implement the bound 'writeBytecode' method.
- void writeBytecode(pybind11::object fileObject);
+ void writeBytecode(const pybind11::object &fileObject);
/// Moves the operation before or after the other operation.
void moveAfter(PyOperationBase &other);
More information about the Mlir-commits
mailing list