]> granicus.if.org Git - llvm/commitdiff
[Orc][RPC] Return unsupported rpc function errors from the non-retry cases in
authorLang Hames <lhames@gmail.com>
Tue, 17 Jan 2017 04:07:48 +0000 (04:07 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 17 Jan 2017 04:07:48 +0000 (04:07 +0000)
negotiateFunction.

These cases were accidentally left out of r292055, resulting in a less
descriptive ECError being returned on these paths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292193 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/Orc/RPCUtils.h

index 4be247a1cde4126962e484262906d2084032c660..5267b50f744b9f423fc728090f52e16c9331d3d8 100644 (file)
@@ -1124,7 +1124,7 @@ public:
     if (auto RemoteIdOrErr = callB<OrcRPCNegotiate>(Func::getPrototype())) {
       this->RemoteFunctionIds[Func::getPrototype()] = *RemoteIdOrErr;
       if (*RemoteIdOrErr == this->getInvalidFunctionId())
-        return orcError(OrcErrorCode::UnknownRPCFunction);
+        return make_error<RPCFunctionNotSupported>(Func::getPrototype());
       return Error::success();
     } else
       return RemoteIdOrErr.takeError();
@@ -1262,7 +1262,7 @@ public:
     if (auto RemoteIdOrErr = callB<OrcRPCNegotiate>(Func::getPrototype())) {
       this->RemoteFunctionIds[Func::getPrototype()] = *RemoteIdOrErr;
       if (*RemoteIdOrErr == this->getInvalidFunctionId())
-        return orcError(OrcErrorCode::UnknownRPCFunction);
+        return make_error<RPCFunctionNotSupported>(Func::getPrototype());
       return Error::success();
     } else
       return RemoteIdOrErr.takeError();