diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/OrcError.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Orc/OrcError.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp index c531fe36992..eaa75ad06a2 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcError.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcError.cpp @@ -58,10 +58,30 @@ static ManagedStatic<OrcErrorCategory> OrcErrCat; namespace llvm { namespace orc { +char RPCFunctionNotSupported::ID = 0; + Error orcError(OrcErrorCode ErrCode) { typedef std::underlying_type<OrcErrorCode>::type UT; return errorCodeToError( 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); +} + +void RPCFunctionNotSupported::log(raw_ostream &OS) const { + OS << "Could not negotiate RPC function '" << RPCFunctionSignature << "'"; +} + +const std::string &RPCFunctionNotSupported::getFunctionSignature() const { + return RPCFunctionSignature; +} + } } |