diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -251,7 +251,7 @@ BC->HasFixedLoadAddress = !IsPIC; - return BC; + return std::move(BC); } bool BinaryContext::forceSymbolRelocations(StringRef SymbolName) const { diff --git a/bolt/lib/Rewrite/MachORewriteInstance.cpp b/bolt/lib/Rewrite/MachORewriteInstance.cpp --- a/bolt/lib/Rewrite/MachORewriteInstance.cpp +++ b/bolt/lib/Rewrite/MachORewriteInstance.cpp @@ -91,7 +91,7 @@ std::make_unique(InputFile, ToolPath, Err); if (Err) return std::move(Err); - return MachORI; + return std::move(MachORI); } MachORewriteInstance::MachORewriteInstance(object::MachOObjectFile *InputFile, diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -363,7 +363,7 @@ auto RI = std::make_unique(File, Argc, Argv, ToolPath, Err); if (Err) return std::move(Err); - return RI; + return std::move(RI); } RewriteInstance::RewriteInstance(ELFObjectFileBase *File, const int Argc,