mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
[Orc][RPC] Add a HandlerTratis specialization for free functions.
llvm-svn: 294392
This commit is contained in:
parent
f7fe49c66d
commit
efecfcc24b
@ -417,6 +417,11 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
// Handler traits for free functions.
|
||||
template <typename RetT, typename... ArgTs>
|
||||
class HandlerTraits<RetT(*)(ArgTs...)>
|
||||
: public HandlerTraits<RetT(ArgTs...)> {};
|
||||
|
||||
// Handler traits for class methods (especially call operators for lambdas).
|
||||
template <typename Class, typename RetT, typename... ArgTs>
|
||||
class HandlerTraits<RetT (Class::*)(ArgTs...)>
|
||||
|
@ -145,6 +145,15 @@ private:
|
||||
};
|
||||
|
||||
|
||||
void freeVoidBool(bool B) {
|
||||
};
|
||||
|
||||
TEST(DummyRPC, TestFreeFunctionHandler) {
|
||||
Queue Q1, Q2;
|
||||
DummyRPCEndpoint Server(Q2, Q1);
|
||||
Server.addHandler<DummyRPCAPI::VoidBool>(freeVoidBool);
|
||||
};
|
||||
|
||||
TEST(DummyRPC, TestAsyncVoidBool) {
|
||||
Queue Q1, Q2;
|
||||
DummyRPCEndpoint Client(Q1, Q2);
|
||||
|
Loading…
Reference in New Issue
Block a user