[PATCH] D67407: All Errors must be checked

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 13:54:36 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL371662: All Errors must be checked (authored by cbieneman, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D67407?vs=219636&id=219797#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D67407

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


Index: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
===================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
+++ llvm/trunk/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.219797.patch
Type: text/x-patch
Size: 865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190911/359416c1/attachment.bin>


More information about the llvm-commits mailing list