diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h @@ -751,9 +751,9 @@ Error Result = Error::success(); if (auto Err = SerializationTraits::deserialize(C, Result)) - return Err; + return joinErrors(std::move(Result), std::move(Err)); if (auto Err = C.endReceiveMessage()) - return Err; + return joinErrors(std::move(Result), std::move(Err)); return Handler(std::move(Result)); }