From ff3fe145fe48646d24371d3fe438fd03b0a6413f Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 17 Jan 2020 15:50:53 +0000 Subject: [PATCH] Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimizing-move warning. --- llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h index 7946b5b..a1a4a10 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h @@ -405,7 +405,7 @@ private: if (auto Sym = LD.findSymbol(BaseLayer, MangledName, false)) continue; else if (auto Err = Sym.takeError()) - return std::move(Err); + return Err; } // Record all functions defined by this module. -- 2.7.4