Revert "Remove redundant "std::move"s in return statements"

The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
diff --git a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
index b465b11..29d18b6 100644
--- a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
@@ -102,7 +102,7 @@
 
 Optional<CompileOnDemandLayer::GlobalValueSet>
 CompileOnDemandLayer::compileRequested(GlobalValueSet Requested) {
-  return Requested;
+  return std::move(Requested);
 }
 
 Optional<CompileOnDemandLayer::GlobalValueSet>
@@ -294,7 +294,7 @@
             SymbolFlags[Mangle(GV->getName())] =
                 JITSymbolFlags::fromGlobalValue(*GV);
           if (auto Err = R.defineMaterializing(SymbolFlags))
-            return Err;
+            return std::move(Err);
         }
 
         expandPartition(*GVsToExtract);