diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/File.h')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/File.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h index 3b7c379c55e..bfb150a440d 100644 --- a/lld/lib/ReaderWriter/MachO/File.h +++ b/lld/lib/ReaderWriter/MachO/File.h @@ -231,9 +231,8 @@ protected: if (std::error_code ec = normFile.getError()) return ec; // Convert normalized mach-o to atoms. - if (std::error_code ec = normalized::normalizedObjectToAtoms( - this, **normFile, false)) - return ec; + if (auto ec = normalized::normalizedObjectToAtoms(this, **normFile, false)) + return llvm::errorToErrorCode(std::move(ec)); return std::error_code(); } @@ -321,9 +320,8 @@ public: if (std::error_code ec = normFile.getError()) return ec; // Convert normalized mach-o to atoms. - if (std::error_code ec = normalized::normalizedDylibToAtoms( - this, **normFile, false)) - return ec; + if (auto ec = normalized::normalizedDylibToAtoms(this, **normFile, false)) + return llvm::errorToErrorCode(std::move(ec)); return std::error_code(); } |