1 //===--------------- RPCUtils.cpp - RPCUtils implementation ---------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // RPCUtils implementation.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/ExecutionEngine/Orc/RPCUtils.h"
16 char llvm::orc::rpc::RPCFatalError::ID = 0;
17 char llvm::orc::rpc::ConnectionClosed::ID = 0;
18 char llvm::orc::rpc::ResponseAbandoned::ID = 0;
19 char llvm::orc::rpc::CouldNotNegotiate::ID = 0;
25 std::error_code ConnectionClosed::convertToErrorCode() const {
26 return orcError(OrcErrorCode::RPCConnectionClosed);
29 void ConnectionClosed::log(raw_ostream &OS) const {
30 OS << "RPC connection already closed";
33 std::error_code ResponseAbandoned::convertToErrorCode() const {
34 return orcError(OrcErrorCode::RPCResponseAbandoned);
37 void ResponseAbandoned::log(raw_ostream &OS) const {
38 OS << "RPC response abandoned";
41 CouldNotNegotiate::CouldNotNegotiate(std::string Signature)
42 : Signature(std::move(Signature)) {}
44 std::error_code CouldNotNegotiate::convertToErrorCode() const {
45 return orcError(OrcErrorCode::RPCCouldNotNegotiateFunction);
48 void CouldNotNegotiate::log(raw_ostream &OS) const {
49 OS << "Could not negotiate RPC function " << Signature;
53 } // end namespace rpc
54 } // end namespace orc
55 } // end namespace llvm