[llvm-exegesis] Remove unneeded std::move()
authorMiloš Stojanović <Milos.Stojanovic@rt-rk.com>
Mon, 13 Jan 2020 13:04:56 +0000 (14:04 +0100)
committerMiloš Stojanović <Milos.Stojanovic@rt-rk.com>
Mon, 13 Jan 2020 13:19:17 +0000 (14:19 +0100)
Caught by buildbot breakage:

/home/docker/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp:89:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
    return std::move(Instructions);
           ^
/home/docker/worker_env/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm/llvm/tools/llvm-exegesis/lib/Mips/Target.cpp:89:12: note: remove std::move call here
    return std::move(Instructions);
           ^~~~~~~~~~            ~

llvm/tools/llvm-exegesis/lib/Mips/Target.cpp

index d37034c..a2038eb 100644 (file)
@@ -86,7 +86,7 @@ static std::vector<MCInst> loadImmediate(unsigned Reg, bool IsGPR32,
           .addImm(LoBits));
     }
 
-    return std::move(Instructions);
+    return Instructions;
   }
 
   llvm_unreachable("Not implemented for values wider than 32 bits");