summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-04-06 01:35:13 +0000
committerLang Hames <lhames@gmail.com>2017-04-06 01:35:13 +0000
commita1d0f71c007fcad4d560927d6903c9e3bb0607e3 (patch)
tree7a7033cb6708d26ca39020231e9edcddfe322202 /llvm/lib/ExecutionEngine
parentbef72b77fada7d71940277aadd58b6e22f3168a9 (diff)
downloadbcm5719-llvm-a1d0f71c007fcad4d560927d6903c9e3bb0607e3.tar.gz
bcm5719-llvm-a1d0f71c007fcad4d560927d6903c9e3bb0607e3.zip
[Orc] Make orcError return an error_code rather than Error.
This will allow orcError to be used in convertToErrorCode implementations, which will help in transitioning Orc RPC to Error. llvm-svn: 299610
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/OrcError.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
index eaa75ad06a2..dcbbf5f2ae7 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp
@@ -60,19 +60,16 @@ namespace orc {
char RPCFunctionNotSupported::ID = 0;
-Error orcError(OrcErrorCode ErrCode) {
+std::error_code orcError(OrcErrorCode ErrCode) {
typedef std::underlying_type<OrcErrorCode>::type UT;
- return errorCodeToError(
- std::error_code(static_cast<UT>(ErrCode), *OrcErrCat));
+ return std::error_code(static_cast<UT>(ErrCode), *OrcErrCat);
}
RPCFunctionNotSupported::RPCFunctionNotSupported(std::string RPCFunctionSignature)
: RPCFunctionSignature(std::move(RPCFunctionSignature)) {}
std::error_code RPCFunctionNotSupported::convertToErrorCode() const {
- typedef std::underlying_type<OrcErrorCode>::type UT;
- return std::error_code(static_cast<UT>(OrcErrorCode::UnknownRPCFunction),
- *OrcErrCat);
+ return orcError(OrcErrorCode::UnknownRPCFunction);
}
void RPCFunctionNotSupported::log(raw_ostream &OS) const {
OpenPOWER on IntegriCloud