[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than
authorLang Hames <lhames@gmail.com>
Mon, 29 Aug 2016 21:56:30 +0000 (21:56 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 29 Aug 2016 21:56:30 +0000 (21:56 +0000)
commit3d0657d2eefef27886734673e5d2d1d43d4cbc62
treebe8b921e9d38b00632ca3b063b0687e77eab3c79
parent124186616a446128cfc78c0c048484401fa308e2
[ORC][RPC] Make the future type of an Orc RPC call Error/Expected rather than
Optional.

For void functions the return type of a nonblocking call changes from
Expected<future<Optional<bool>>> to Expected<future<Error>>, and for functions
returning T the return type changes from Expected<future<Optional<T>>> to
Expected<future<Expected<T>>>.

Inner results need to be checked (since the RPC connection may have dropped
out before a result came back) and Error/Expected provide stronger checking
requirements. It also allows us drop the crufty 'optionalToError' function and
just collapse Errors in the single-threaded call primitives.

llvm-svn: 280016
llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp