[PATCH] D67407: All Errors must be checked

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 17:09:03 PDT 2019


beanz updated this revision to Diff 219636.
beanz added a comment.

Updates based on feedback from Lang.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67407/new/

https://reviews.llvm.org/D67407

Files:
  llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h


Index: llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
===================================================================
--- llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
+++ llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
@@ -749,11 +749,15 @@
   // 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));
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67407.219636.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190911/2ee87486/attachment.bin>


More information about the llvm-commits mailing list