[llvm] r268697 - Object: Fix two -Wpessimizing-move warnings after r268694
Kevin Enderby via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 17:49:01 PDT 2016
Thanks for the fixes!
> On May 5, 2016, at 4:59 PM, Justin Bogner via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: bogner
> Date: Thu May 5 18:59:57 2016
> New Revision: 268697
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268697&view=rev
> Log:
> Object: Fix two -Wpessimizing-move warnings after r268694
>
> Modified:
> llvm/trunk/lib/Object/MachOObjectFile.cpp
>
> Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=268697&r1=268696&r2=268697&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
> +++ llvm/trunk/lib/Object/MachOObjectFile.cpp Thu May 5 18:59:57 2016
> @@ -41,8 +41,7 @@ namespace {
> static Error
> malformedError(const MachOObjectFile &Obj, Twine Msg) {
> std::string StringMsg = "truncated or malformed object (" + Msg.str() + ")";
> - return make_error<GenericBinaryError>(std::move(Obj.getFileName()),
> - std::move(StringMsg),
> + return make_error<GenericBinaryError>(Obj.getFileName(), std::move(StringMsg),
> object_error::parse_failed);
> }
>
> @@ -2396,7 +2395,7 @@ ObjectFile::createMachOObjectFile(Memory
> return MachOObjectFile::create(Buffer, false, true);
> if (Magic == "\xCF\xFA\xED\xFE")
> return MachOObjectFile::create(Buffer, true, true);
> - return make_error<GenericBinaryError>(std::move(Buffer.getBufferIdentifier()),
> - "Unrecognized MachO magic number",
> - object_error::invalid_file_type);
> + return make_error<GenericBinaryError>(Buffer.getBufferIdentifier(),
> + "Unrecognized MachO magic number",
> + object_error::invalid_file_type);
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list