diff options
author | Chris Bieneman <chris.bieneman@me.com> | 2019-09-11 20:54:38 +0000 |
---|---|---|
committer | Chris Bieneman <chris.bieneman@me.com> | 2019-09-11 20:54:38 +0000 |
commit | 393b4eac495575f2327dc62f58b18593b4867f00 (patch) | |
tree | 1d6c7abafa5590e498e7f76af7a10af7c2d57609 | |
parent | f0bb45fac35c14edd09e3fbe603db75caaf3ef22 (diff) | |
download | bcm5719-llvm-393b4eac495575f2327dc62f58b18593b4867f00.tar.gz bcm5719-llvm-393b4eac495575f2327dc62f58b18593b4867f00.zip |
All Errors must be checked
Summary: If an error is ever returned from any of the functions called here, the error must be joined with the Result Error before being returned otherwise the Result Error will assert on destruction.
Reviewers: lhames
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67407
llvm-svn: 371662
-rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h index 4e63a84ed17..6e08581f2dc 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h @@ -749,11 +749,15 @@ public: // to the user defined handler. Error handleResponse(ChannelT &C) override { Error Result = Error::success(); - if (auto Err = - SerializationTraits<ChannelT, Error, Error>::deserialize(C, Result)) + if (auto Err = SerializationTraits<ChannelT, Error, Error>::deserialize( + C, Result)) { + consumeError(std::move(Result)); return Err; - if (auto Err = C.endReceiveMessage()) + } + if (auto Err = C.endReceiveMessage()) { + consumeError(std::move(Result)); return Err; + } return Handler(std::move(Result)); } |