diff --git a/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp b/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp --- a/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp +++ b/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp @@ -361,8 +361,8 @@ #elif defined(_WIN32) if (!UnmapViewOfFile(Reservations[Base].LocalAddr)) - joinErrors(std::move(Err), - errorCodeToError(mapWindowsError(GetLastError()))); + Err = joinErrors(std::move(Err), + errorCodeToError(mapWindowsError(GetLastError()))); #endif