[llvm] [Orc] Move TaskDispatcher ownership from EPC to derived classes (PR #85071)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 06:03:20 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff aec92830b79a8c49cdce0d592627d5f18bb6370b 21ba6039b2deb158211cafb4e851a7ea2672fb9b -- llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
index 2aacc1ea2a..83f9bea158 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
@@ -188,7 +188,7 @@ public:
   };
 
   ExecutorProcessControl(std::shared_ptr<SymbolStringPool> SSP)
-    : SSP(std::move(SSP)) {}
+      : SSP(std::move(SSP)) {}
 
   virtual ~ExecutorProcessControl();
 
@@ -418,7 +418,6 @@ public:
   virtual Error disconnect() = 0;
 
 protected:
-
   std::shared_ptr<SymbolStringPool> SSP;
   ExecutionSession *ES = nullptr;
   Triple TargetTriple;
@@ -464,10 +463,9 @@ class UnsupportedExecutorProcessControl : public ExecutorProcessControl,
 public:
   UnsupportedExecutorProcessControl(
       std::shared_ptr<SymbolStringPool> SSP = nullptr,
-      const std::string &TT = "",
-      unsigned PageSize = 0)
-      : ExecutorProcessControl(
-            SSP ? std::move(SSP) : std::make_shared<SymbolStringPool>()),
+      const std::string &TT = "", unsigned PageSize = 0)
+      : ExecutorProcessControl(SSP ? std::move(SSP)
+                                   : std::make_shared<SymbolStringPool>()),
         InProcessMemoryAccess(Triple(TT).isArch64Bit()) {
     this->TargetTriple = Triple(TT);
     this->PageSize = PageSize;
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h b/llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
index 0d7267dc4d..fdbd9c4fb7 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
@@ -96,7 +96,8 @@ public:
 private:
   SimpleRemoteEPC(std::shared_ptr<SymbolStringPool> SSP,
                   std::unique_ptr<TaskDispatcher> D)
-      : ExecutorProcessControl(std::move(SSP)), OwnedTaskDispatcher(std::move(D)) {
+      : ExecutorProcessControl(std::move(SSP)),
+        OwnedTaskDispatcher(std::move(D)) {
     this->D = OwnedTaskDispatcher.get();
   }
 
diff --git a/llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
index 6643ecab74..3b073b6846 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
@@ -182,8 +182,7 @@ TEST(ObjectLinkingLayerSearchGeneratorTest, AbsoluteSymbolsObjectLayer) {
   class TestEPC : public UnsupportedExecutorProcessControl {
   public:
     TestEPC()
-        : UnsupportedExecutorProcessControl(nullptr,
-                                            "x86_64-apple-darwin") {}
+        : UnsupportedExecutorProcessControl(nullptr, "x86_64-apple-darwin") {}
 
     Expected<tpctypes::DylibHandle> loadDylib(const char *DylibPath) override {
       return ExecutorAddr::fromPtr((void *)nullptr);

``````````

</details>


https://github.com/llvm/llvm-project/pull/85071


More information about the llvm-commits mailing list