[Orc] Remove the FPRPCChannel class from RPCChannel.h - it requires unistd.h,

which was removed in r257306.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames 2016-01-11 02:15:12 +00:00
parent b2e58d7b03
commit ed650a3bd9

View File

@ -28,33 +28,6 @@ public:
virtual std::error_code send() = 0; virtual std::error_code send() = 0;
}; };
/// RPC channel that reads from and writes from file descriptors.
class FDRPCChannel : public RPCChannel {
public:
FDRPCChannel(int InFD, int OutFD) : InFD(InFD), OutFD(OutFD) {}
std::error_code readBytes(char *Dst, unsigned Size) override {
assert(Dst && "Attempt to read into null.");
ssize_t ReadResult = ::read(InFD, Dst, Size);
if (ReadResult != Size)
return std::error_code(errno, std::generic_category());
return std::error_code();
}
std::error_code appendBytes(const char *Src, unsigned Size) override {
assert(Src && "Attempt to append from null.");
ssize_t WriteResult = ::write(OutFD, Src, Size);
if (WriteResult != Size)
std::error_code(errno, std::generic_category());
return std::error_code();
}
std::error_code send() override { return std::error_code(); }
private:
int InFD, OutFD;
};
/// RPC channel serialization for a variadic list of arguments. /// RPC channel serialization for a variadic list of arguments.
template <typename T, typename... Ts> template <typename T, typename... Ts>
std::error_code serialize_seq(RPCChannel &C, const T &Arg, const Ts &... Args) { std::error_code serialize_seq(RPCChannel &C, const T &Arg, const Ts &... Args) {