LLVM  16.0.0git
EPCEHFrameRegistrar.h
Go to the documentation of this file.
1 //===-- EPCEHFrameRegistrar.h - EPC based eh-frame 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 // ExecutorProcessControl based eh-frame registration.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
14 #define LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
15 
18 
19 namespace llvm {
20 namespace orc {
21 
22 class ExecutionSession;
23 
24 /// Register/Deregisters EH frames in a remote process via a
25 /// ExecutorProcessControl instance.
27 public:
28  /// Create from a ExecutorProcessControl instance alone. This will use
29  /// the EPC's lookupSymbols method to find the registration/deregistration
30  /// funciton addresses by name.
33 
34  /// Create a EPCEHFrameRegistrar with the given ExecutorProcessControl
35  /// object and registration/deregistration function addresses.
37  ExecutorAddr RegisterEHFrameWrapperFnAddr,
38  ExecutorAddr DeregisterEHFRameWrapperFnAddr)
39  : ES(ES), RegisterEHFrameWrapperFnAddr(RegisterEHFrameWrapperFnAddr),
40  DeregisterEHFrameWrapperFnAddr(DeregisterEHFRameWrapperFnAddr) {}
41 
42  Error registerEHFrames(ExecutorAddrRange EHFrameSection) override;
43  Error deregisterEHFrames(ExecutorAddrRange EHFrameSection) override;
44 
45 private:
46  ExecutionSession &ES;
47  ExecutorAddr RegisterEHFrameWrapperFnAddr;
48  ExecutorAddr DeregisterEHFrameWrapperFnAddr;
49 };
50 
51 } // end namespace orc
52 } // end namespace llvm
53 
54 #endif // LLVM_EXECUTIONENGINE_ORC_EPCEHFRAMEREGISTRAR_H
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:31
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
llvm::orc::EPCEHFrameRegistrar::deregisterEHFrames
Error deregisterEHFrames(ExecutorAddrRange EHFrameSection) override
Definition: EPCEHFrameRegistrar.cpp:64
llvm::orc::EPCEHFrameRegistrar
Register/Deregisters EH frames in a remote process via a ExecutorProcessControl instance.
Definition: EPCEHFrameRegistrar.h:26
EHFrameSupport.h
llvm::orc::ExecutorAddrRange
Represents an address range in the exceutor process.
Definition: ExecutorAddress.h:191
llvm::orc::EPCEHFrameRegistrar::EPCEHFrameRegistrar
EPCEHFrameRegistrar(ExecutionSession &ES, ExecutorAddr RegisterEHFrameWrapperFnAddr, ExecutorAddr DeregisterEHFRameWrapperFnAddr)
Create a EPCEHFrameRegistrar with the given ExecutorProcessControl object and registration/deregistra...
Definition: EPCEHFrameRegistrar.h:36
llvm::orc::EPCEHFrameRegistrar::registerEHFrames
Error registerEHFrames(ExecutorAddrRange EHFrameSection) override
Definition: EPCEHFrameRegistrar.cpp:59
ExecutorAddress.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::orc::ExecutionSession
An ExecutionSession represents a running JIT program.
Definition: Core.h:1358
llvm::orc::EPCEHFrameRegistrar::Create
static Expected< std::unique_ptr< EPCEHFrameRegistrar > > Create(ExecutionSession &ES)
Create from a ExecutorProcessControl instance alone.
Definition: EPCEHFrameRegistrar.cpp:20