[Mlir-commits] [mlir] 4e01184 - Apply clang-tidy fixes for performance-unnecessary-value-param in JitRunner.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Apr 19 00:23:30 PDT 2022


Author: Mehdi Amini
Date: 2022-04-19T07:23:12Z
New Revision: 4e01184ad5a6470f1031af0ebfffb2fe97e303d7

URL: https://github.com/llvm/llvm-project/commit/4e01184ad5a6470f1031af0ebfffb2fe97e303d7
DIFF: https://github.com/llvm/llvm-project/commit/4e01184ad5a6470f1031af0ebfffb2fe97e303d7.diff

LOG: Apply clang-tidy fixes for performance-unnecessary-value-param in JitRunner.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/ExecutionEngine/JitRunner.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/ExecutionEngine/JitRunner.cpp b/mlir/lib/ExecutionEngine/JitRunner.cpp
index df9ec290bb947..0e7004dca7c97 100644
--- a/mlir/lib/ExecutionEngine/JitRunner.cpp
+++ b/mlir/lib/ExecutionEngine/JitRunner.cpp
@@ -36,6 +36,7 @@
 #include "llvm/Support/ToolOutputFile.h"
 #include <cstdint>
 #include <numeric>
+#include <utility>
 
 using namespace mlir;
 using llvm::Error;
@@ -242,7 +243,8 @@ static Error compileAndExecuteVoidFunction(Options &options, ModuleOp module,
   if (!mainFunction || mainFunction.empty())
     return makeStringError("entry point not found");
   void *empty = nullptr;
-  return compileAndExecute(options, module, entryPoint, config, &empty);
+  return compileAndExecute(options, module, entryPoint, std::move(config),
+                           &empty);
 }
 
 template <typename Type>
@@ -297,8 +299,8 @@ Error compileAndExecuteSingleReturnFunction(Options &options, ModuleOp module,
     void *data;
   } data;
   data.data = &res;
-  if (auto error = compileAndExecute(options, module, entryPoint, config,
-                                     (void **)&data))
+  if (auto error = compileAndExecute(options, module, entryPoint,
+                                     std::move(config), (void **)&data))
     return error;
 
   // Intentional printing of the output so we can test.


        


More information about the Mlir-commits mailing list