diff --git a/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h b/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h index f6d7c820720..3385b7ab106 100644 --- a/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h +++ b/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h @@ -410,10 +410,10 @@ template class WrapperFunction : private WrapperFunction { public: - template - static Error call(const void *FnTag, const ArgTs &...Args) { + template + static Error call(const CallerFn &Caller, const ArgTs &...Args) { SPSEmpty BE; - return WrapperFunction::call(FnTag, BE, Args...); + return WrapperFunction::call(Caller, BE, Args...); } using WrapperFunction::handle; diff --git a/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp b/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp index d93637ea128..1f177b4c2d1 100644 --- a/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp +++ b/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp @@ -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::handle(ArgData, ArgSize, voidNoop); @@ -64,7 +66,7 @@ static WrapperFunctionResult addWrapper(const char *ArgData, size_t ArgSize) { } TEST(WrapperFunctionUtilsTest, WrapperFunctionCallVoidNoopAndHandle) { - EXPECT_FALSE(!!WrapperFunction::call((void *)&voidNoopWrapper)); + EXPECT_FALSE(!!WrapperFunction::call(voidNoopWrapper)); } TEST(WrapperFunctionUtilsTest, WrapperFunctionCallAndHandle) {