[llvm-exegesis] Pacify bots - don't std::move() - prevents copy elision
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 10 Apr 2019 12:47:47 +0000 (12:47 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 10 Apr 2019 12:47:47 +0000 (12:47 +0000)
llvm-svn: 358079

llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp

index 976ea87..4a696e2 100644 (file)
@@ -392,7 +392,7 @@ llvm::Error InstructionBenchmark::writeYaml(const LLVMState &State,
                                             const llvm::StringRef Filename) {
   if (Filename == "-") {
     if (auto Err = writeYamlTo(State, llvm::outs()))
-      return std::move(Err);
+      return Err;
   } else {
     int ResultFD = 0;
     if (auto E = llvm::errorCodeToError(
@@ -402,7 +402,7 @@ llvm::Error InstructionBenchmark::writeYaml(const LLVMState &State,
     }
     llvm::raw_fd_ostream Ostr(ResultFD, true /*shouldClose*/);
     if (auto Err = writeYamlTo(State, Ostr))
-      return std::move(Err);
+      return Err;
   }
   return llvm::Error::success();
 }