[llvm] [ORC] Forward declare DylibManager in ExecutorProcessControl.h. (PR #191771)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 01:07:26 PDT 2026


https://github.com/lhames created https://github.com/llvm/llvm-project/pull/191771

None

>From ddc52d4d6e9dc4605e7aa7459922741bd369ba72 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Sat, 11 Apr 2026 12:28:38 +1000
Subject: [PATCH] [ORC] Forward declare DylibManager in
 ExecutorProcessControl.h.

---
 .../ExecutionEngine/Orc/EPCGenericDylibManager.h    |  1 +
 .../ExecutionEngine/Orc/ExecutorProcessControl.h    |  2 +-
 .../Orc/SelfExecutorProcessControl.h                | 12 +-----------
 .../Orc/SelfExecutorProcessControl.cpp              | 13 +++++++++++++
 4 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/llvm/include/llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h b/llvm/include/llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h
index 12394e85ff2c9..2836467f07df3 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h
@@ -18,6 +18,7 @@
 #ifndef LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
 #define LLVM_EXECUTIONENGINE_ORC_EPCGENERICDYLIBMANAGER_H
 
+#include "llvm/ExecutionEngine/Orc/DylibManager.h"
 #include "llvm/ExecutionEngine/Orc/ExecutorProcessControl.h"
 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorSymbolDef.h"
 #include "llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h"
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
index f0479bfc0ef9e..78d39fcb11581 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
@@ -15,7 +15,6 @@
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
-#include "llvm/ExecutionEngine/Orc/DylibManager.h"
 #include "llvm/ExecutionEngine/Orc/MemoryAccess.h"
 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
 #include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
@@ -32,6 +31,7 @@
 
 namespace llvm::orc {
 
+class DylibManager;
 class ExecutionSession;
 
 /// ExecutorProcessControl supports interaction with a JIT target process.
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h
index d09998328d48c..f741d665c2421 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h
@@ -56,17 +56,7 @@ class LLVM_ABI SelfExecutorProcessControl : public ExecutorProcessControl {
   Error disconnect() override;
 
 private:
-  class InProcessDylibManager : public DylibManager {
-  public:
-    InProcessDylibManager(char GlobalManglingPrefix);
-    Expected<tpctypes::DylibHandle> loadDylib(const char *DylibPath) override;
-    void
-    lookupSymbolsAsync(ArrayRef<LookupRequest> Request,
-                       DylibManager::SymbolLookupCompleteFn Complete) override;
-
-  private:
-    char GlobalManglingPrefix;
-  };
+  class InProcessDylibManager;
 
   static shared::CWrapperFunctionBuffer
   jitDispatchViaWrapperFunctionManager(void *Ctx, const void *FnTag,
diff --git a/llvm/lib/ExecutionEngine/Orc/SelfExecutorProcessControl.cpp b/llvm/lib/ExecutionEngine/Orc/SelfExecutorProcessControl.cpp
index 4c15ab82857a4..b24abafa82895 100644
--- a/llvm/lib/ExecutionEngine/Orc/SelfExecutorProcessControl.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/SelfExecutorProcessControl.cpp
@@ -9,6 +9,7 @@
 #include "llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h"
 
 #include "llvm/ExecutionEngine/Orc/Core.h"
+#include "llvm/ExecutionEngine/Orc/DylibManager.h"
 #include "llvm/ExecutionEngine/Orc/InProcessMemoryAccess.h"
 #include "llvm/ExecutionEngine/Orc/TargetProcess/DefaultHostBootstrapValues.h"
 #include "llvm/ExecutionEngine/Orc/TargetProcess/TargetExecutionUtils.h"
@@ -20,6 +21,18 @@
 
 namespace llvm::orc {
 
+class SelfExecutorProcessControl::InProcessDylibManager : public DylibManager {
+public:
+  InProcessDylibManager(char GlobalManglingPrefix);
+  Expected<tpctypes::DylibHandle> loadDylib(const char *DylibPath) override;
+  void
+  lookupSymbolsAsync(ArrayRef<LookupRequest> Request,
+                     DylibManager::SymbolLookupCompleteFn Complete) override;
+
+private:
+  char GlobalManglingPrefix;
+};
+
 SelfExecutorProcessControl::SelfExecutorProcessControl(
     std::shared_ptr<SymbolStringPool> SSP, std::unique_ptr<TaskDispatcher> D,
     Triple TargetTriple, unsigned PageSize,



More information about the llvm-commits mailing list