Skip to content

Commit

Permalink
Apply clang-tidy fixes for performance-unnecessary-value-param in Jit…
Browse files Browse the repository at this point in the history
…Runner.cpp (NFC)
  • Loading branch information
joker-eph committed Apr 19, 2022
1 parent 722a3a5 commit 4e01184
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mlir/lib/ExecutionEngine/JitRunner.cpp
Expand Up @@ -36,6 +36,7 @@
#include "llvm/Support/ToolOutputFile.h"
#include <cstdint>
#include <numeric>
#include <utility>

using namespace mlir;
using llvm::Error;
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 4e01184

Please sign in to comment.