[llvm] r293405 - [Orc][RPC] Remove a couple of redundant calls to abandonAllPendingResponses.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 16:51:17 PST 2017


Author: lhames
Date: Sat Jan 28 18:51:17 2017
New Revision: 293405

URL: http://llvm.org/viewvc/llvm-project?rev=293405&view=rev
Log:
[Orc][RPC] Remove a couple of redundant calls to abandonAllPendingResponses.

appendCallAsync, which all RPC call functions ultimately build on, will call
abandonAllPendingResponses on channel error. These extra calls are redundant.

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

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h?rev=293405&r1=293404&r2=293405&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Sat Jan 28 18:51:17 2017
@@ -1155,7 +1155,6 @@ public:
               return Error::success();
             },
             Args...)) {
-      this->abandonPendingResponses();
       RTraits::consumeAbandoned(FutureResult.get());
       return std::move(Err);
     }
@@ -1188,12 +1187,6 @@ public:
   typename detail::ResultTraits<AltRetT>::ErrorReturnType
   callB(const ArgTs &... Args) {
     if (auto FutureResOrErr = callNB<Func>(Args...)) {
-      if (auto Err = this->C.send()) {
-        this->abandonPendingResponses();
-        detail::ResultTraits<typename Func::ReturnType>::consumeAbandoned(
-            std::move(FutureResOrErr->get()));
-        return std::move(Err);
-      }
       return FutureResOrErr->get();
     } else
       return FutureResOrErr.takeError();




More information about the llvm-commits mailing list