diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h index 27cd92968fe55a..105dac8e8d0434 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h @@ -456,7 +456,7 @@ class SelfExecutorProcessControl void writeBuffersAsync(ArrayRef Ws, WriteResultFn OnWriteComplete) override; - static shared::detail::CWrapperFunctionResult + static shared::CWrapperFunctionResult jitDispatchViaWrapperFunctionManager(void *Ctx, const void *FnTag, const char *Data, size_t Size); diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h index d071eb9b475e8c..0e8b7e7d345a0b 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h @@ -81,8 +81,8 @@ struct WrapperFunctionCall { : Func(Func), ArgData(ArgData) {} shared::WrapperFunctionResult run() { - using FnTy = shared::detail::CWrapperFunctionResult(const char *ArgData, - size_t ArgSize); + using FnTy = + shared::CWrapperFunctionResult(const char *ArgData, size_t ArgSize); return shared::WrapperFunctionResult( Func.toPtr()(ArgData.Start.toPtr(), static_cast(ArgData.size().getValue()))); diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h index b1ca1f10097b21..bf841b1f706be3 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h @@ -23,24 +23,18 @@ namespace llvm { namespace orc { namespace shared { -namespace detail { - -// DO NOT USE DIRECTLY. // Must be kept in-sync with compiler-rt/lib/orc/c-api.h. union CWrapperFunctionResultDataUnion { char *ValuePtr; char Value[sizeof(ValuePtr)]; }; -// DO NOT USE DIRECTLY. // Must be kept in-sync with compiler-rt/lib/orc/c-api.h. typedef struct { CWrapperFunctionResultDataUnion Data; size_t Size; } CWrapperFunctionResult; -} // end namespace detail - /// C++ wrapper function result: Same as CWrapperFunctionResult but /// auto-releases memory. class WrapperFunctionResult { @@ -49,11 +43,11 @@ class WrapperFunctionResult { WrapperFunctionResult() { init(R); } /// Create a WrapperFunctionResult by taking ownership of a - /// detail::CWrapperFunctionResult. + /// CWrapperFunctionResult. /// /// Warning: This should only be used by clients writing wrapper-function /// caller utilities (like TargetProcessControl). - WrapperFunctionResult(detail::CWrapperFunctionResult R) : R(R) { + WrapperFunctionResult(CWrapperFunctionResult R) : R(R) { // Reset R. init(R); } @@ -78,12 +72,12 @@ class WrapperFunctionResult { free(R.Data.ValuePtr); } - /// Release ownership of the contained detail::CWrapperFunctionResult. + /// Release ownership of the contained CWrapperFunctionResult. /// Warning: Do not use -- this method will be removed in the future. It only /// exists to temporarily support some code that will eventually be moved to /// the ORC runtime. - detail::CWrapperFunctionResult release() { - detail::CWrapperFunctionResult Tmp; + CWrapperFunctionResult release() { + CWrapperFunctionResult Tmp; init(Tmp); std::swap(R, Tmp); return Tmp; @@ -164,12 +158,12 @@ class WrapperFunctionResult { } private: - static void init(detail::CWrapperFunctionResult &R) { + static void init(CWrapperFunctionResult &R) { R.Data.ValuePtr = nullptr; R.Size = 0; } - detail::CWrapperFunctionResult R; + CWrapperFunctionResult R; }; namespace detail { diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h index 3fad98b5f178a7..cfb951178da697 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h @@ -16,7 +16,7 @@ #include "llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h" #include -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerJITLoaderGDBWrapper(const char *Data, uint64_t Size); #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_JITLOADERGDB_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h index 6d12be363d34b1..735aa53e41fd5d 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h @@ -37,7 +37,7 @@ Error deregisterEHFrameSection(const void *EHFrameSectionAddr, /// call. This function expects the direct address and size of the eh-frame /// section to register as its arguments (it does not treat its arguments as /// pointers to an SPS-serialized arg buffer). -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionCustomDirectWrapper( const char *EHFrameSectionAddr, uint64_t Size); @@ -45,14 +45,14 @@ llvm_orc_registerEHFrameSectionCustomDirectWrapper( /// call. This function expects the direct address and size of the eh-frame /// section to register as its arguments (it does not treat its arguments as /// pointers to an SPS-serialized arg buffer). -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionCustomDirectWrapper( const char *EHFrameSectionAddr, uint64_t Size); -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size); -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionWrapper(const char *Data, uint64_t Size); #endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REGISTEREHFRAMES_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h index 4599279bef30a4..cbab234f8a2d34 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h @@ -46,10 +46,10 @@ class SimpleExecutorDylibManager : public ExecutorBootstrapService { private: using DylibsMap = DenseMap; - static llvm::orc::shared::detail::CWrapperFunctionResult + static llvm::orc::shared::CWrapperFunctionResult openWrapper(const char *ArgData, size_t ArgSize); - static llvm::orc::shared::detail::CWrapperFunctionResult + static llvm::orc::shared::CWrapperFunctionResult lookupWrapper(const char *ArgData, size_t ArgSize); std::mutex M; diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h index 00094055c4f3ad..6858f6d4db6e74 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h @@ -50,13 +50,13 @@ class SimpleExecutorMemoryManager : public ExecutorBootstrapService { Error deallocateImpl(void *Base, Allocation &A); - static llvm::orc::shared::detail::CWrapperFunctionResult + static llvm::orc::shared::CWrapperFunctionResult reserveWrapper(const char *ArgData, size_t ArgSize); - static llvm::orc::shared::detail::CWrapperFunctionResult + static llvm::orc::shared::CWrapperFunctionResult finalizeWrapper(const char *ArgData, size_t ArgSize); - static llvm::orc::shared::detail::CWrapperFunctionResult + static llvm::orc::shared::CWrapperFunctionResult deallocateWrapper(const char *ArgData, size_t ArgSize); std::mutex M; diff --git a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h index e2a360002ba22b..afd3d39dbb53a6 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h @@ -151,9 +151,10 @@ class SimpleRemoteEPCServer : public SimpleRemoteEPCTransportClient { shared::WrapperFunctionResult doJITDispatch(const void *FnTag, const char *ArgData, size_t ArgSize); - static shared::detail::CWrapperFunctionResult - jitDispatchEntry(void *DispatchCtx, const void *FnTag, const char *ArgData, - size_t ArgSize); + static shared::CWrapperFunctionResult jitDispatchEntry(void *DispatchCtx, + const void *FnTag, + const char *ArgData, + size_t ArgSize); uint64_t getNextSeqNo() { return NextSeqNo++; } void releaseSeqNo(uint64_t) {} diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp index b5435293da13c3..2eb835551adb1b 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp @@ -125,7 +125,7 @@ void SelfExecutorProcessControl::callWrapperAsync(ExecutorAddr WrapperFnAddr, IncomingWFRHandler SendResult, ArrayRef ArgBuffer) { using WrapperFnTy = - shared::detail::CWrapperFunctionResult (*)(const char *Data, size_t Size); + shared::CWrapperFunctionResult (*)(const char *Data, size_t Size); auto *WrapperFn = WrapperFnAddr.toPtr(); SendResult(WrapperFn(ArgBuffer.data(), ArgBuffer.size())); } @@ -170,7 +170,7 @@ void SelfExecutorProcessControl::writeBuffersAsync( OnWriteComplete(Error::success()); } -shared::detail::CWrapperFunctionResult +shared::CWrapperFunctionResult SelfExecutorProcessControl::jitDispatchViaWrapperFunctionManager( void *Ctx, const void *FnTag, const char *Data, size_t Size) { diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp index 787a6c6b4c1624..e12a800f066688 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp @@ -93,7 +93,7 @@ static void registerJITLoaderGDBImpl(ExecutorAddrRange DebugObjRange) { __jit_debug_register_code(); } -extern "C" orc::shared::detail::CWrapperFunctionResult +extern "C" orc::shared::CWrapperFunctionResult llvm_orc_registerJITLoaderGDBWrapper(const char *Data, uint64_t Size) { using namespace orc::shared; return WrapperFunction::handle( diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp index c74186b0fc2c0d..82aa62a0c0d921 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp @@ -22,7 +22,7 @@ namespace orc { namespace rt_bootstrap { template -static llvm::orc::shared::detail::CWrapperFunctionResult +static llvm::orc::shared::CWrapperFunctionResult writeUIntsWrapper(const char *ArgData, size_t ArgSize) { return WrapperFunction)>::handle( ArgData, ArgSize, @@ -33,7 +33,7 @@ writeUIntsWrapper(const char *ArgData, size_t ArgSize) { .release(); } -static llvm::orc::shared::detail::CWrapperFunctionResult +static llvm::orc::shared::CWrapperFunctionResult writeBuffersWrapper(const char *ArgData, size_t ArgSize) { return WrapperFunction)>::handle( ArgData, ArgSize, @@ -45,7 +45,7 @@ writeBuffersWrapper(const char *ArgData, size_t ArgSize) { .release(); } -static llvm::orc::shared::detail::CWrapperFunctionResult +static llvm::orc::shared::CWrapperFunctionResult runAsMainWrapper(const char *ArgData, size_t ArgSize) { return WrapperFunction::handle( ArgData, ArgSize, diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp index 89d2807e0a4622..e331bad8420086 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp @@ -158,22 +158,22 @@ Error deregisterEHFrameSection(const void *EHFrameSectionAddr, } // end namespace orc } // end namespace llvm -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionCustomDirectWrapper( const char *EHFrameSectionAddr, uint64_t Size) { if (auto Err = registerEHFrameSection(EHFrameSectionAddr, Size)) return WrapperFunctionResult::createOutOfBandError(toString(std::move(Err))) .release(); - return llvm::orc::shared::detail::CWrapperFunctionResult(); + return llvm::orc::shared::CWrapperFunctionResult(); } -extern "C" llvm::orc::shared::detail::CWrapperFunctionResult +extern "C" llvm::orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionCustomDirectWrapper( const char *EHFrameSectionAddr, uint64_t Size) { if (auto Err = deregisterEHFrameSection(EHFrameSectionAddr, Size)) return WrapperFunctionResult::createOutOfBandError(toString(std::move(Err))) .release(); - return llvm::orc::shared::detail::CWrapperFunctionResult(); + return llvm::orc::shared::CWrapperFunctionResult(); } static Error registerEHFrameWrapper(ExecutorAddr Addr, uint64_t Size) { @@ -184,14 +184,14 @@ static Error deregisterEHFrameWrapper(ExecutorAddr Addr, uint64_t Size) { return llvm::orc::deregisterEHFrameSection(Addr.toPtr(), Size); } -extern "C" orc::shared::detail::CWrapperFunctionResult +extern "C" orc::shared::CWrapperFunctionResult llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size) { return WrapperFunction::handle( Data, Size, registerEHFrameWrapper) .release(); } -extern "C" orc::shared::detail::CWrapperFunctionResult +extern "C" orc::shared::CWrapperFunctionResult llvm_orc_deregisterEHFrameSectionWrapper(const char *Data, uint64_t Size) { return WrapperFunction::handle( Data, Size, deregisterEHFrameWrapper) diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp index fcba6d690e0e8f..3c9dd21b083201 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp @@ -104,7 +104,7 @@ void SimpleExecutorDylibManager::addBootstrapSymbols( ExecutorAddr::fromPtr(&lookupWrapper); } -llvm::orc::shared::detail::CWrapperFunctionResult +llvm::orc::shared::CWrapperFunctionResult SimpleExecutorDylibManager::openWrapper(const char *ArgData, size_t ArgSize) { return shared:: WrapperFunction::handle( @@ -114,7 +114,7 @@ SimpleExecutorDylibManager::openWrapper(const char *ArgData, size_t ArgSize) { .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult +llvm::orc::shared::CWrapperFunctionResult SimpleExecutorDylibManager::lookupWrapper(const char *ArgData, size_t ArgSize) { return shared:: WrapperFunction::handle( diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp index 90dcc9e4ccf7ca..232340c22a32d9 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp @@ -223,7 +223,7 @@ Error SimpleExecutorMemoryManager::deallocateImpl(void *Base, Allocation &A) { return Err; } -llvm::orc::shared::detail::CWrapperFunctionResult +llvm::orc::shared::CWrapperFunctionResult SimpleExecutorMemoryManager::reserveWrapper(const char *ArgData, size_t ArgSize) { return shared::WrapperFunction< @@ -234,7 +234,7 @@ SimpleExecutorMemoryManager::reserveWrapper(const char *ArgData, .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult +llvm::orc::shared::CWrapperFunctionResult SimpleExecutorMemoryManager::finalizeWrapper(const char *ArgData, size_t ArgSize) { return shared::WrapperFunction< @@ -245,7 +245,7 @@ SimpleExecutorMemoryManager::finalizeWrapper(const char *ArgData, .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult +llvm::orc::shared::CWrapperFunctionResult SimpleExecutorMemoryManager::deallocateWrapper(const char *ArgData, size_t ArgSize) { return shared::WrapperFunction< diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp index 558209928a292b..b6b21bde11823f 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp @@ -246,7 +246,7 @@ void SimpleRemoteEPCServer::handleCallWrapper( SimpleRemoteEPCArgBytesVector ArgBytes) { D->dispatch([this, RemoteSeqNo, TagAddr, ArgBytes = std::move(ArgBytes)]() { using WrapperFnTy = - shared::detail::CWrapperFunctionResult (*)(const char *, size_t); + shared::CWrapperFunctionResult (*)(const char *, size_t); auto *Fn = TagAddr.toPtr(); shared::WrapperFunctionResult ResultBytes( Fn(ArgBytes.data(), ArgBytes.size())); @@ -281,7 +281,7 @@ SimpleRemoteEPCServer::doJITDispatch(const void *FnTag, const char *ArgData, return ResultF.get(); } -shared::detail::CWrapperFunctionResult +shared::CWrapperFunctionResult SimpleRemoteEPCServer::jitDispatchEntry(void *DispatchCtx, const void *FnTag, const char *ArgData, size_t ArgSize) { return reinterpret_cast(DispatchCtx) diff --git a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp index a95435aec2a34a..ff326e0782f354 100644 --- a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp @@ -78,24 +78,24 @@ class SimpleAllocator { DenseMap Blocks; }; -llvm::orc::shared::detail::CWrapperFunctionResult -testReserve(const char *ArgData, size_t ArgSize) { +llvm::orc::shared::CWrapperFunctionResult testReserve(const char *ArgData, + size_t ArgSize) { return WrapperFunction:: handle(ArgData, ArgSize, makeMethodWrapperHandler(&SimpleAllocator::reserve)) .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult -testFinalize(const char *ArgData, size_t ArgSize) { +llvm::orc::shared::CWrapperFunctionResult testFinalize(const char *ArgData, + size_t ArgSize) { return WrapperFunction:: handle(ArgData, ArgSize, makeMethodWrapperHandler(&SimpleAllocator::finalize)) .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult -testDeallocate(const char *ArgData, size_t ArgSize) { +llvm::orc::shared::CWrapperFunctionResult testDeallocate(const char *ArgData, + size_t ArgSize) { return WrapperFunction< rt::SPSSimpleExecutorMemoryManagerDeallocateSignature>:: handle(ArgData, ArgSize, diff --git a/llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp b/llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp index ec594909b890af..83f50ecb10651b 100644 --- a/llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp @@ -18,8 +18,8 @@ using namespace llvm::orc::shared; namespace { template -llvm::orc::shared::detail::CWrapperFunctionResult -testWriteUInts(const char *ArgData, size_t ArgSize) { +llvm::orc::shared::CWrapperFunctionResult testWriteUInts(const char *ArgData, + size_t ArgSize) { return WrapperFunction)>::handle( ArgData, ArgSize, [](std::vector Ws) { @@ -29,8 +29,8 @@ testWriteUInts(const char *ArgData, size_t ArgSize) { .release(); } -llvm::orc::shared::detail::CWrapperFunctionResult -testWriteBuffers(const char *ArgData, size_t ArgSize) { +llvm::orc::shared::CWrapperFunctionResult testWriteBuffers(const char *ArgData, + size_t ArgSize) { return WrapperFunction)>::handle( ArgData, ArgSize, [](std::vector Ws) { diff --git a/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp index 81a9d547f2bafe..784896f9f2671c 100644 --- a/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp @@ -18,8 +18,8 @@ using namespace llvm; using namespace llvm::orc; using namespace llvm::orc::shared; -static llvm::orc::shared::detail::CWrapperFunctionResult -addWrapper(const char *ArgData, size_t ArgSize) { +static llvm::orc::shared::CWrapperFunctionResult addWrapper(const char *ArgData, + size_t ArgSize) { return WrapperFunction::handle( ArgData, ArgSize, [](int32_t X, int32_t Y) { return X + Y; }) .release(); @@ -30,7 +30,7 @@ static void addAsyncWrapper(unique_function SendResult, SendResult(X + Y); } -static llvm::orc::shared::detail::CWrapperFunctionResult +static llvm::orc::shared::CWrapperFunctionResult voidWrapper(const char *ArgData, size_t ArgSize) { return WrapperFunction::handle(ArgData, ArgSize, []() {}).release(); } diff --git a/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp index 238592fa377d6d..9888429166c4fe 100644 --- a/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp @@ -20,8 +20,8 @@ using namespace llvm::orc::rt_bootstrap; namespace { -orc::shared::detail::CWrapperFunctionResult -incrementWrapper(const char *ArgData, size_t ArgSize) { +orc::shared::CWrapperFunctionResult incrementWrapper(const char *ArgData, + size_t ArgSize) { return WrapperFunction::handle( ArgData, ArgSize, [](ExecutorAddr A) { *A.toPtr() += 1; }) .release();