Fix a bunch more of -Wpessimizing-move issues.

Thanks to Rui for pointing out this warning was firing.

llvm-svn: 264978
This commit is contained in:
Pete Cooper 2016-03-31 00:38:02 +00:00
parent e487da165c
commit dc59c794d0
1 changed files with 4 additions and 4 deletions

View File

@ -782,7 +782,7 @@ llvm::Error MachOFileLayout::writeLoadCommands() {
return ec;
} else {
if (auto ec = writeSingleSegmentLoadCommand<MachO32Trait>(lc))
return std::move(ec);
return ec;
}
// Add LC_SYMTAB with symbol table info
symtab_command* st = reinterpret_cast<symtab_command*>(lc);
@ -828,10 +828,10 @@ llvm::Error MachOFileLayout::writeLoadCommands() {
// Final linked images have sections under segments.
if (_is64) {
if (auto ec = writeSegmentLoadCommands<MachO64Trait>(lc))
return std::move(ec);
return ec;
} else {
if (auto ec = writeSegmentLoadCommands<MachO32Trait>(lc))
return std::move(ec);
return ec;
}
// Add LC_ID_DYLIB command for dynamic libraries.
@ -1481,7 +1481,7 @@ llvm::Error MachOFileLayout::writeBinary(StringRef path) {
_buffer = fob->getBufferStart();
writeMachHeader();
if (auto ec = writeLoadCommands())
return std::move(ec);
return ec;
writeSectionContent();
writeLinkEditContent();
fob->commit();