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
22namespace llvm::orc {
23
24/// Adds AllocationActions to register and deregister eh-frame sections in the
25/// absence of native Platform support.
28public:
31
33 ExecutorAddr DeregisterEHFrame)
34 : RegisterEHFrame(RegisterEHFrame), DeregisterEHFrame(DeregisterEHFrame) {
35 }
36
37 void modifyPassConfig(MaterializationResponsibility &MR,
39 jitlink::PassConfiguration &PassConfig) override;
44 return Error::success();
45 }
47 ResourceKey SrcKey) override {}
48
49private:
50 ExecutorAddr RegisterEHFrame;
51 ExecutorAddr DeregisterEHFrame;
52};
53
54} // namespace llvm::orc
55
56#endif // LLVM_EXECUTIONENGINE_ORC_EHFRAMEREGISTRATIONPLUGIN_H
#define LLVM_ABI
Definition Compiler.h:213
#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
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:1342
Represents an address in the executor process.
Represents a JIT'd dynamic library.
Definition Core.h:906
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:580
uintptr_t ResourceKey
Definition Core.h:79