enhance(compiler): fix warnings

remove unused signature, functions, variable
remove pessimizing-moves
add cast before comparison
This commit is contained in:
Mayeul@Zama
2022-02-24 18:40:45 +01:00
committed by mayeul-zama
parent c440fc30f8
commit 73bb1c03d8
7 changed files with 19 additions and 37 deletions

View File

@@ -58,7 +58,7 @@ JitCompilerEngine::buildLambda(llvm::StringRef s, llvm::StringRef funcName,
std::unique_ptr<llvm::MemoryBuffer> mb = llvm::MemoryBuffer::getMemBuffer(s);
llvm::Expected<JitCompilerEngine::Lambda> res =
this->buildLambda(std::move(mb), funcName, cache, runtimeLibPath);
return std::move(res);
return res;
}
// Build a lambda from the function with the name given in
@@ -77,7 +77,7 @@ JitCompilerEngine::buildLambda(llvm::SourceMgr &sm, llvm::StringRef funcName,
this->compile(sm, Target::LLVM_IR);
if (!compResOrErr)
return std::move(compResOrErr.takeError());
return compResOrErr.takeError();
auto compRes = std::move(compResOrErr.get());