[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
authorLang Hames <lhames@gmail.com>
Sat, 12 Nov 2016 02:19:31 +0000 (02:19 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 12 Nov 2016 02:19:31 +0000 (02:19 +0000)
commit03418af0464063af381a6a715d00f749da95f6e2
treed848794e918cd0fe1c33cfed4c7e78f53f757e38
parent8fa568d761183c9c34f6fffa64fe541fe5277376
[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.

This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.

This patch allows us to remove the RPC unit-test workaround added in r286646.

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