forked from OSchip/llvm-project
Fix a bunch of -Wpessimizing-move issues.
Thanks to Rui for pointing out this warning was firing. llvm-svn: 264977
This commit is contained in:
parent
021de058df
commit
e487da165c
|
@ -779,7 +779,7 @@ llvm::Error MachOFileLayout::writeLoadCommands() {
|
|||
// Object files have one unnamed segment which holds all sections.
|
||||
if (_is64) {
|
||||
if (auto ec = writeSingleSegmentLoadCommand<MachO64Trait>(lc))
|
||||
return std::move(ec);
|
||||
return ec;
|
||||
} else {
|
||||
if (auto ec = writeSingleSegmentLoadCommand<MachO32Trait>(lc))
|
||||
return std::move(ec);
|
||||
|
|
|
@ -1177,7 +1177,7 @@ normalizedObjectToAtoms(MachOFile *file,
|
|||
continue;
|
||||
if (llvm::Error ec = convertRelocs(sect, normalizedFile, scatterable,
|
||||
*file, *handler))
|
||||
return std::move(ec);
|
||||
return ec;
|
||||
}
|
||||
|
||||
// Add additional arch-specific References
|
||||
|
|
|
@ -33,13 +33,13 @@ public:
|
|||
llvm::Expected<std::unique_ptr<NormalizedFile>> nFile =
|
||||
normalized::normalizedFromAtoms(file, _ctx);
|
||||
if (auto ec = nFile.takeError())
|
||||
return std::move(ec);
|
||||
return ec;
|
||||
|
||||
// For testing, write out yaml form of normalized file.
|
||||
if (_ctx.printAtoms()) {
|
||||
std::unique_ptr<Writer> yamlWriter = createWriterYAML(_ctx);
|
||||
if (auto ec = yamlWriter->writeFile(file, "-"))
|
||||
return std::move(ec);
|
||||
return ec;
|
||||
}
|
||||
|
||||
// Write normalized file as mach-o binary.
|
||||
|
|
Loading…
Reference in New Issue