diff options
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index f75291d2..d41afc8 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -29,8 +29,8 @@ template <typename T> static Expected<const T *> getObject(MemoryBufferRef M, const void *Ptr, const uint64_t Size = sizeof(T)) { uintptr_t Addr = uintptr_t(Ptr); - if (Error E = Binary::checkOffset(M, Addr, Size)) - return std::move(E); + if (std::error_code EC = Binary::checkOffset(M, Addr, Size)) + return errorCodeToError(EC); return reinterpret_cast<const T *>(Addr); } |