From 5b0d783078965bc22201259bd61f86301c97376f Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Wed, 7 Nov 2018 16:52:50 +0000 Subject: [PATCH] [llvm-exegesis] Remove superfluous move. /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] return std::move(Error); ^ /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/tools/llvm-exegesis/lib/X86/Target.cpp:155:12: note: remove std::move call here return std::move(Error); ^~~~~~~~~~ ~ llvm-svn: 346333 --- llvm/tools/llvm-exegesis/lib/X86/Target.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp index 7f26adbe237d..618e4d77db4c 100644 --- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp +++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp @@ -152,7 +152,7 @@ static llvm::Error IsInvalidOpcode(const Instruction &Instr) { return llvm::make_error( "unsupported opcode: Push/Pop/AdjCallStack"); if (llvm::Error Error = isInvalidMemoryInstr(Instr)) - return std::move(Error); + return Error; // We do not handle instructions with OPERAND_PCREL. for (const Operand &Op : Instr.Operands) if (Op.isExplicit() &&