[PATCH] D124009: [BOLT] Fix build
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 08:50:14 PDT 2022
yota9 created this revision.
yota9 added reviewers: maksfb, rafauler, Amir.
Herald added a subscriber: ayermolo.
Herald added a project: All.
yota9 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The gcc 7.3.0 version raises "could not covert" error without std::move
used explicitly.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124009
Files:
bolt/lib/Core/BinaryContext.cpp
bolt/lib/Rewrite/MachORewriteInstance.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
Index: bolt/lib/Rewrite/RewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/RewriteInstance.cpp
+++ bolt/lib/Rewrite/RewriteInstance.cpp
@@ -363,7 +363,7 @@
auto RI = std::make_unique<RewriteInstance>(File, Argc, Argv, ToolPath, Err);
if (Err)
return std::move(Err);
- return RI;
+ return std::move(RI);
}
RewriteInstance::RewriteInstance(ELFObjectFileBase *File, const int Argc,
Index: bolt/lib/Rewrite/MachORewriteInstance.cpp
===================================================================
--- bolt/lib/Rewrite/MachORewriteInstance.cpp
+++ bolt/lib/Rewrite/MachORewriteInstance.cpp
@@ -91,7 +91,7 @@
std::make_unique<MachORewriteInstance>(InputFile, ToolPath, Err);
if (Err)
return std::move(Err);
- return MachORI;
+ return std::move(MachORI);
}
MachORewriteInstance::MachORewriteInstance(object::MachOObjectFile *InputFile,
Index: bolt/lib/Core/BinaryContext.cpp
===================================================================
--- bolt/lib/Core/BinaryContext.cpp
+++ bolt/lib/Core/BinaryContext.cpp
@@ -251,7 +251,7 @@
BC->HasFixedLoadAddress = !IsPIC;
- return BC;
+ return std::move(BC);
}
bool BinaryContext::forceSymbolRelocations(StringRef SymbolName) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124009.423643.patch
Type: text/x-patch
Size: 1286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220419/38930dd1/attachment.bin>
More information about the llvm-commits
mailing list