LLVM 22.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
18
19namespace llvm::orc {
20
23public:
25 ExecutorAddr Deregister)
26 : ES(ES), Register(Register), Deregister(Deregister) {
27 DSOBaseName = ES.intern("__jitlink$libunwind_dso_base");
28 }
29
32
35
38 jitlink::PassConfiguration &PassConfig) override;
39
43
47
49 return Error::success();
50 }
51
53 ResourceKey SrcKey) override {}
54
55private:
56 Error addUnwindInfoRegistrationActions(jitlink::LinkGraph &G);
57
59 SymbolStringPtr DSOBaseName;
60 ExecutorAddr Register, Deregister;
61};
62
63} // namespace llvm::orc
64
65#endif // LLVM_EXECUTIONENGINE_ORC_UNWINDINFOREGISTRATIONPLUGIN_H
#define LLVM_ABI
Definition Compiler.h:213
#define G(x, y, z)
Definition MD5.cpp:56
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
Wrapper class representing virtual and physical registers.
Definition Register.h:19
An ExecutionSession represents a running JIT program.
Definition Core.h:1355
Represents an address in the executor process.
Represents a JIT'd dynamic library.
Definition Core.h:902
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:576
Pointer to a pooled string representing a symbol name.
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::PassConfiguration &PassConfig) override
static Expected< std::shared_ptr< UnwindInfoRegistrationPlugin > > Create(ExecutionSession &ES, ExecutorAddr Register, ExecutorAddr Deregister)
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
UnwindInfoRegistrationPlugin(ExecutionSession &ES, ExecutorAddr Register, ExecutorAddr Deregister)
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
Error notifyFailed(MaterializationResponsibility &MR) override
Error notifyEmitted(MaterializationResponsibility &MR) override
uintptr_t ResourceKey
Definition Core.h:75