diff options
author | Lang Hames <lhames@gmail.com> | 2016-08-29 21:56:30 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2016-08-29 21:56:30 +0000 |
commit | 3d0657d2eefef27886734673e5d2d1d43d4cbc62 (patch) | |
tree | be8b921e9d38b00632ca3b063b0687e77eab3c79 /llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp | |
parent | 124186616a446128cfc78c0c048484401fa308e2 (diff) | |
download | bcm5719-llvm-3d0657d2eefef27886734673e5d2d1d43d4cbc62.tar.gz bcm5719-llvm-3d0657d2eefef27886734673e5d2d1d43d4cbc62.zip |
[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
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp index 7d55641e4ce..22d3739adc6 100644 --- a/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp @@ -102,8 +102,8 @@ TEST_F(DummyRPC, TestAsyncVoidBool) { } // Verify that the function returned ok. - auto Val = ResOrErr->first.get(); - EXPECT_TRUE(Val) << "Remote void function failed to execute."; + auto Err = ResOrErr->first.get(); + EXPECT_TRUE(!!Err) << "Remote void function failed to execute."; } TEST_F(DummyRPC, TestAsyncIntInt) { @@ -179,8 +179,8 @@ TEST_F(DummyRPC, TestSerialization) { } // Verify that the function returned ok. - auto Val = ResOrErr->first.get(); - EXPECT_TRUE(Val) << "Remote void function failed to execute."; + auto Err = ResOrErr->first.get(); + EXPECT_TRUE(!!Err) << "Remote void function failed to execute."; } // Test the synchronous call API. |