Skip to content

Commit 3cc1031

Browse files
[Debuginfod] Fix warnings
This patch fixes: llvm/lib/Debuginfod/Debuginfod.cpp:592:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move] llvm/lib/Debuginfod/Debuginfod.cpp:613:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
1 parent fb866f9 commit 3cc1031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Debuginfod/Debuginfod.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Error DebuginfodServer::init(DebuginfodLog &Log,
589589
streamFile(Request, *PathOrErr);
590590
});
591591
if (Err)
592-
return std::move(Err);
592+
return Err;
593593

594594
Err =
595595
Server.get(R"(/buildid/(.*)/executable)", [&](HTTPServerRequest Request) {
@@ -610,7 +610,7 @@ Error DebuginfodServer::init(DebuginfodLog &Log,
610610
streamFile(Request, *PathOrErr);
611611
});
612612
if (Err)
613-
return std::move(Err);
613+
return Err;
614614
return Error::success();
615615
}
616616

0 commit comments

Comments
 (0)