diff options
author | Lang Hames <lhames@gmail.com> | 2016-04-25 19:56:45 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2016-04-25 19:56:45 +0000 |
commit | ef5a0ee2c3dad1c0e2fc51cf260a76d2acadf063 (patch) | |
tree | b64ecf2ee46a302e33d6348b66917baf1bec1f2d /llvm/lib/ExecutionEngine/Orc/OrcError.cpp | |
parent | 074ea2851c4a4c5afeba2390d905eca062d66096 (diff) | |
download | llvm-ef5a0ee2c3dad1c0e2fc51cf260a76d2acadf063.zip llvm-ef5a0ee2c3dad1c0e2fc51cf260a76d2acadf063.tar.gz llvm-ef5a0ee2c3dad1c0e2fc51cf260a76d2acadf063.tar.bz2 |
[ORC] Thread Error/Expected through the RPC library.
This replaces use of std::error_code and ErrorOr in the ORC RPC support library
with Error and Expected. This required updating the OrcRemoteTarget API, Client,
and server code, as well as updating the Orc C API.
This patch also fixes several instances where Errors were dropped.
llvm-svn: 267457
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/OrcError.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/OrcError.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp index 5e12c86..37b4990 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp @@ -51,9 +51,10 @@ static ManagedStatic<OrcErrorCategory> OrcErrCat; namespace llvm { namespace orc { -std::error_code orcError(OrcErrorCode ErrCode) { +Error orcError(OrcErrorCode ErrCode) { typedef std::underlying_type<OrcErrorCode>::type UT; - return std::error_code(static_cast<UT>(ErrCode), *OrcErrCat); + return errorCodeToError(std::error_code(static_cast<UT>(ErrCode), + *OrcErrCat)); } } } |