LLVM 22.0.0git
EHFrameRegistrationPlugin.h
Go to the documentation of this file.
1//===----- EHFrameRegistrationPlugin.h - Register eh-frames -----*- 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 sections with a registrar.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_EHFRAMEREGISTRATIONPLUGIN_H
14#define LLVM_EXECUTIONENGINE_ORC_EHFRAMEREGISTRATIONPLUGIN_H
15
18
19#include <memory>
20#include <mutex>
21#include <vector>
22
23namespace llvm::orc {
24
25/// Adds AllocationActions to register and deregister eh-frame sections in the
26/// absence of native Platform support.
29public:
32
34 ExecutorAddr DeregisterEHFrame)
35 : RegisterEHFrame(RegisterEHFrame), DeregisterEHFrame(DeregisterEHFrame) {
36 }
37
38 void modifyPassConfig(MaterializationResponsibility &MR,
40 jitlink::PassConfiguration &PassConfig) override;
45 return Error::success();
46 }
48 ResourceKey SrcKey) override {}
49
50private:
51 ExecutorAddr RegisterEHFrame;
52 ExecutorAddr DeregisterEHFrame;
53};
54
55} // namespace llvm::orc
56
57#endif // LLVM_EXECUTIONENGINE_ORC_EHFRAMEREGISTRATIONPLUGIN_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
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
EHFrameRegistrationPlugin(ExecutorAddr RegisterEHFrame, ExecutorAddr DeregisterEHFrame)
static Expected< std::unique_ptr< EHFrameRegistrationPlugin > > Create(ExecutionSession &ES)
Error notifyFailed(MaterializationResponsibility &MR) override
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
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
uintptr_t ResourceKey
Definition Core.h:75