[clang-repl] Use std::move when converting Error to Expected
authorAnubhab Ghosh <anubhabghosh.me@gmail.com>
Wed, 29 Mar 2023 02:48:36 +0000 (08:18 +0530)
committerAnubhab Ghosh <anubhabghosh.me@gmail.com>
Wed, 29 Mar 2023 02:48:36 +0000 (08:18 +0530)
clang/lib/Interpreter/Interpreter.cpp

index 76d5f16..a0ccbc2 100644 (file)
@@ -207,7 +207,7 @@ const CompilerInstance *Interpreter::getCompilerInstance() const {
 llvm::Expected<llvm::orc::LLJIT &> Interpreter::getExecutionEngine() {
   if (!IncrExecutor) {
     if (auto Err = CreateExecutor())
-      return Err;
+      return std::move(Err);
   }
 
   return IncrExecutor->GetExecutionEngine();