LLVM 23.0.0git
UnwindInfoRegistrationPlugin.h
Go to the documentation of this file.
1//===- UnwindInfoRegistrationPlugin.h -- libunwind registration -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Register eh-frame and compact-unwind sections with libunwind
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_UNWINDINFOREGISTRATIONPLUGIN_H
14#define LLVM_EXECUTIONENGINE_ORC_UNWINDINFOREGISTRATIONPLUGIN_H
15
19
20namespace llvm::orc {
21
24public:
26 ExecutorAddr RegisterSections,
27 ExecutorAddr DeregisterSections)
28 : RegisterSections(RegisterSections),
29 DeregisterSections(DeregisterSections) {
30 DSOBaseName = ES.intern("__jitlink$libunwind_dso_base");
31 }
32
34 Create(ExecutionSession &ES,
37
38 void modifyPassConfig(MaterializationResponsibility &MR,
40 jitlink::PassConfiguration &PassConfig) override;
41
45
49
51 return Error::success();
52 }
53
55 ResourceKey SrcKey) override {}
56
57private:
58 Error addUnwindInfoRegistrationActions(jitlink::LinkGraph &G);
59
60 SymbolStringPtr DSOBaseName;
61 ExecutorAddr RegisterSections, DeregisterSections;
62};
63
64} // namespace llvm::orc
65
66#endif // LLVM_EXECUTIONENGINE_ORC_UNWINDINFOREGISTRATIONPLUGIN_H
#define LLVM_ABI
Definition Compiler.h:215
#define G(x, y, z)
Definition MD5.cpp:55
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
static ErrorSuccess success()
Create a success value.
Definition Error.h:336
Tagged union holding either a T or a Error.
Definition Error.h:485
An ExecutionSession represents a running JIT program.
Definition Core.h:1131
SymbolStringPtr intern(StringRef SymName)
Add a symbol name to the SymbolStringPool and return a pointer to it.
Definition Core.h:1185
Represents an address in the executor process.
Represents a JIT'd dynamic library.
Definition Core.h:695
Plugin instances can be added to the ObjectLinkingLayer to receive callbacks when code is loaded or e...
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition Core.h:369
Pointer to a pooled string representing a symbol name.
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
UnwindInfoRegistrationPlugin(ExecutionSession &ES, ExecutorAddr RegisterSections, ExecutorAddr DeregisterSections)
Error notifyFailed(MaterializationResponsibility &MR) override
Error notifyEmitted(MaterializationResponsibility &MR) override
const LLVM_ABI MachOUnwindInfoRegistrarSymbolNames orc_rt_MachOUnwindInfoRegistrarSPSSymbols
Default symbol names for the ORC runtime's StandaloneMachOUnwindInfoRegistrar SPS interface.
uintptr_t ResourceKey
Definition Core.h:80
Symbol names for the ORC runtime's StandaloneMachOUnwindInfoRegistrar SPS interface.
Definition OrcRTBridge.h:98