[llvm] [ORC] Resolve unwind-info alloc-actions via lookupAndApply (PR #223312)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 23:32:54 PDT 2026


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

UnwindInfoRegistrationPlugin::Create resolved its register- / deregister-section alloc-actions with EPC.getBootstrapSymbols. For consistency, switch to lookupAndApply/recordAddr on the bootstrap JITDylib instead.

>From f27285c081fafc5d48ad615fd4168a15e00dabdb Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Mon, 14 Sep 2026 15:48:49 +1000
Subject: [PATCH] [ORC] Resolve unwind-info alloc-actions via lookupAndApply

UnwindInfoRegistrationPlugin::Create resolved its register- /
deregister-section alloc-actions with EPC.getBootstrapSymbols. For
consistency, switch to lookupAndApply/recordAddr on the bootstrap
JITDylib instead.
---
 .../ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp
index a553d14f00787..1f804c6a1b60a 100644
--- a/llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp
@@ -8,6 +8,7 @@
 
 #include "llvm/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.h"
 
+#include "llvm/ExecutionEngine/Orc/LookupAndApply.h"
 #include "llvm/ExecutionEngine/Orc/Shared/MachOObjectFormat.h"
 #include "llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h"
 #include "llvm/IR/Module.h"
@@ -24,10 +25,10 @@ UnwindInfoRegistrationPlugin::Create(
 
   ExecutorAddr RegisterSections, DeregisterSections;
 
-  auto &EPC = ES.getExecutorProcessControl();
-  if (auto Err = EPC.getBootstrapSymbols(
-          {{RegisterSections, SNs.RegisterSectionsName},
-           {DeregisterSections, SNs.DeregisterSectionsName}}))
+  if (auto Err = lookupAndApply(
+          ES.getBootstrapJITDylib(),
+          {recordAddr(SNs.RegisterSectionsName, &RegisterSections),
+           recordAddr(SNs.DeregisterSectionsName, &DeregisterSections)}))
     return std::move(Err);
 
   return std::make_shared<UnwindInfoRegistrationPlugin>(ES, RegisterSections,



More information about the llvm-commits mailing list