Skip to content

Commit

Permalink
[Orc][RPC] Actually specialize SerializationTraits and RPCTypeName in…
Browse files Browse the repository at this point in the history
… the right

namespace.

r290226 was a think-o - just qualifying the name doesn't count.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290230 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lhames committed Dec 21, 2016
1 parent 0ed0bfd commit 1a6ed84
Showing 1 changed file with 40 additions and 24 deletions.
64 changes: 40 additions & 24 deletions unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,38 +60,54 @@ class QueueChannel : public RawByteChannel {

class RPCFoo {};

template <>
class llvm::orc::rpc::RPCTypeName<RPCFoo> {
public:
static const char* getName() { return "RPCFoo"; }
};
namespace llvm {
namespace orc {
namespace rpc {

template <>
class llvm::orc::rpc::SerializationTraits<QueueChannel, RPCFoo, RPCFoo> {
public:
static Error serialize(QueueChannel&, const RPCFoo&) {
return Error::success();
}
template <>
class RPCTypeName<RPCFoo> {
public:
static const char* getName() { return "RPCFoo"; }
};

static Error deserialize(QueueChannel&, RPCFoo&) {
return Error::success();
}
};
template <>
class SerializationTraits<QueueChannel, RPCFoo, RPCFoo> {
public:
static Error serialize(QueueChannel&, const RPCFoo&) {
return Error::success();
}

static Error deserialize(QueueChannel&, RPCFoo&) {
return Error::success();
}
};

} // end namespace rpc
} // end namespace orc
} // end namespace llvm

class RPCBar {};

template <>
class llvm::orc::rpc::SerializationTraits<QueueChannel, RPCFoo, RPCBar> {
public:
static Error serialize(QueueChannel&, const RPCBar&) {
return Error::success();
}
namespace llvm {
namespace orc {
namespace rpc {

static Error deserialize(QueueChannel&, RPCBar&) {
return Error::success();
}
template <>
class SerializationTraits<QueueChannel, RPCFoo, RPCBar> {
public:
static Error serialize(QueueChannel&, const RPCBar&) {
return Error::success();
}

static Error deserialize(QueueChannel&, RPCBar&) {
return Error::success();
}
};

} // end namespace rpc
} // end namespace orc
} // end namespace llvm

class DummyRPCAPI {
public:

Expand Down

0 comments on commit 1a6ed84

Please sign in to comment.