[llvm] 213666f - [ORC] Move CWrapperFunctionResult out of the detail:: namespace.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 30 16:12:52 PDT 2021


Author: Lang Hames
Date: 2021-10-30T16:12:45-07:00
New Revision: 213666f8044990bbf2999c2dc839b6c984e5616b

URL: https://github.com/llvm/llvm-project/commit/213666f8044990bbf2999c2dc839b6c984e5616b
DIFF: https://github.com/llvm/llvm-project/commit/213666f8044990bbf2999c2dc839b6c984e5616b.diff

LOG: [ORC] Move CWrapperFunctionResult out of the detail:: namespace.

This type has been moved up into the llvm::orc::shared namespace.

This type was originally put in the detail:: namespace on the assumption that
few (if any) LLVM source files would need to use it. In practice it has been
needed in many places, and will continue to be needed until/unless
OrcTargetProcess is fully merged into the ORC runtime.

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
    llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h
    llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
    llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h
    llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h
    llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h
    llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h
    llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h
    llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp
    llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
    llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
    llvm/unittests/ExecutionEngine/Orc/EPCGenericMemoryAccessTest.cpp
    llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
    llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
index 27cd92968fe5..105dac8e8d04 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<tpctypes::BufferWrite> 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 d071eb9b475e..0e8b7e7d345a 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<FnTy *>()(ArgData.Start.toPtr<const char *>(),
                              static_cast<size_t>(ArgData.size().getValue())));

diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
index b1ca1f10097b..bf841b1f706b 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 3fad98b5f178..cfb951178da6 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 <cstdint>
 
-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 6d12be363d34..735aa53e41fd 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 4599279bef30..cbab234f8a2d 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<uint64_t, sys::DynamicLibrary>;
 
-  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 00094055c4f3..6858f6d4db6e 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 e2a360002ba2..afd3d39dbb53 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 b5435293da13..2eb835551adb 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<char> ArgBuffer) {
   using WrapperFnTy =
-      shared::detail::CWrapperFunctionResult (*)(const char *Data, size_t Size);
+      shared::CWrapperFunctionResult (*)(const char *Data, size_t Size);
   auto *WrapperFn = WrapperFnAddr.toPtr<WrapperFnTy>();
   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 787a6c6b4c16..e12a800f0666 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<void(SPSExecutorAddrRange)>::handle(

diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp
index c74186b0fc2c..82aa62a0c0d9 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 <typename WriteT, typename SPSWriteT>
-static llvm::orc::shared::detail::CWrapperFunctionResult
+static llvm::orc::shared::CWrapperFunctionResult
 writeUIntsWrapper(const char *ArgData, size_t ArgSize) {
   return WrapperFunction<void(SPSSequence<SPSWriteT>)>::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<void(SPSSequence<SPSMemoryAccessBufferWrite>)>::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<rt::SPSRunAsMainSignature>::handle(
              ArgData, ArgSize,

diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
index 89d2807e0a46..e331bad84200 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<const void *>(), Size);
 }
 
-extern "C" orc::shared::detail::CWrapperFunctionResult
+extern "C" orc::shared::CWrapperFunctionResult
 llvm_orc_registerEHFrameSectionWrapper(const char *Data, uint64_t Size) {
   return WrapperFunction<SPSError(SPSExecutorAddr, uint64_t)>::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<SPSError(SPSExecutorAddr, uint64_t)>::handle(
              Data, Size, deregisterEHFrameWrapper)

diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp
index fcba6d690e0e..3c9dd21b0832 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<rt::SPSSimpleExecutorDylibManagerOpenSignature>::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<rt::SPSSimpleExecutorDylibManagerLookupSignature>::handle(

diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp
index 90dcc9e4ccf7..232340c22a32 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 558209928a29..b6b21bde1182 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<WrapperFnTy>();
     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<SimpleRemoteEPCServer *>(DispatchCtx)

diff  --git a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
index a95435aec2a3..ff326e0782f3 100644
--- a/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
@@ -78,24 +78,24 @@ class SimpleAllocator {
   DenseMap<void *, sys::OwningMemoryBlock> 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<rt::SPSSimpleExecutorMemoryManagerReserveSignature>::
       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<rt::SPSSimpleExecutorMemoryManagerFinalizeSignature>::
       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 ec594909b890..83f50ecb1065 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 <typename WriteT, typename SPSWriteT>
-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<void(SPSSequence<SPSWriteT>)>::handle(
              ArgData, ArgSize,
              [](std::vector<WriteT> 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<void(SPSSequence<SPSMemoryAccessBufferWrite>)>::handle(
              ArgData, ArgSize,
              [](std::vector<tpctypes::BufferWrite> Ws) {

diff  --git a/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
index 81a9d547f2ba..784896f9f267 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<int32_t(int32_t, int32_t)>::handle(
              ArgData, ArgSize, [](int32_t X, int32_t Y) { return X + Y; })
       .release();
@@ -30,7 +30,7 @@ static void addAsyncWrapper(unique_function<void(int32_t)> SendResult,
   SendResult(X + Y);
 }
 
-static llvm::orc::shared::detail::CWrapperFunctionResult
+static llvm::orc::shared::CWrapperFunctionResult
 voidWrapper(const char *ArgData, size_t ArgSize) {
   return WrapperFunction<void()>::handle(ArgData, ArgSize, []() {}).release();
 }

diff  --git a/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/SimpleExecutorMemoryManagerTest.cpp
index 238592fa377d..9888429166c4 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<void(SPSExecutorAddr)>::handle(
              ArgData, ArgSize, [](ExecutorAddr A) { *A.toPtr<int *>() += 1; })
       .release();


        


More information about the llvm-commits mailing list