1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[ORC] Fix missing function in unit test.

This commit is contained in:
Lang Hames 2021-06-15 21:28:06 +10:00
parent 8d05185ee9
commit 8b99b0a62e
2 changed files with 6 additions and 4 deletions

View File

@ -410,10 +410,10 @@ template <typename... SPSTagTs>
class WrapperFunction<void(SPSTagTs...)>
: private WrapperFunction<SPSEmpty(SPSTagTs...)> {
public:
template <typename... ArgTs>
static Error call(const void *FnTag, const ArgTs &...Args) {
template <typename CallerFn, typename... ArgTs>
static Error call(const CallerFn &Caller, const ArgTs &...Args) {
SPSEmpty BE;
return WrapperFunction<SPSEmpty(SPSTagTs...)>::call(FnTag, BE, Args...);
return WrapperFunction<SPSEmpty(SPSTagTs...)>::call(Caller, BE, Args...);
}
using WrapperFunction<SPSEmpty(SPSTagTs...)>::handle;

View File

@ -53,6 +53,8 @@ TEST(WrapperFunctionUtilsTest, WrapperFunctionResultFromOutOfBandError) {
EXPECT_TRUE(strcmp(R.getOutOfBandError(), TestString) == 0);
}
static void voidNoop() {}
static WrapperFunctionResult voidNoopWrapper(const char *ArgData,
size_t ArgSize) {
return WrapperFunction<void()>::handle(ArgData, ArgSize, voidNoop);
@ -64,7 +66,7 @@ static WrapperFunctionResult addWrapper(const char *ArgData, size_t ArgSize) {
}
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallVoidNoopAndHandle) {
EXPECT_FALSE(!!WrapperFunction<void()>::call((void *)&voidNoopWrapper));
EXPECT_FALSE(!!WrapperFunction<void()>::call(voidNoopWrapper));
}
TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandle) {