Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimi...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 17 Jan 2020 15:50:53 +0000 (15:50 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 17 Jan 2020 15:51:08 +0000 (15:51 +0000)
llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h

index 7946b5b..a1a4a10 100644 (file)
@@ -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.