LLVM  15.0.0git
EHFrameSupport.h
Go to the documentation of this file.
1 //===--------- EHFrameSupport.h - JITLink eh-frame utils --------*- 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 // EHFrame registration support for JITLink.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_EXECUTIONENGINE_JITLINK_EHFRAMESUPPORT_H
14 #define LLVM_EXECUTIONENGINE_JITLINK_EHFRAMESUPPORT_H
15 
16 #include "llvm/ADT/Triple.h"
19 #include "llvm/Support/Error.h"
20 
21 namespace llvm {
22 namespace jitlink {
23 
24 /// Supports registration/deregistration of EH-frames in a target process.
26 public:
27  virtual ~EHFrameRegistrar();
28  virtual Error registerEHFrames(orc::ExecutorAddrRange EHFrameSection) = 0;
29  virtual Error deregisterEHFrames(orc::ExecutorAddrRange EHFrameSection) = 0;
30 };
31 
32 /// Registers / Deregisters EH-frames in the current process.
34 public:
35  Error registerEHFrames(orc::ExecutorAddrRange EHFrameSection) override;
36 
37  Error deregisterEHFrames(orc::ExecutorAddrRange EHFrameSection) override;
38 };
39 
41  orc::ExecutorAddr EHFrameSectionAddr, size_t EHFrameSectionSize)>;
42 
43 /// Creates a pass that records the address and size of the EH frame section.
44 /// If no eh-frame section is found then the address and size will both be given
45 /// as zero.
46 ///
47 /// Authors of JITLinkContexts can use this function to register a post-fixup
48 /// pass that records the range of the eh-frame section. This range can
49 /// be used after finalization to register and deregister the frame.
52  StoreFrameRangeFunction StoreFrameRange);
53 
54 } // end namespace jitlink
55 } // end namespace llvm
56 
57 #endif // LLVM_EXECUTIONENGINE_JITLINK_EHFRAMESUPPORT_H
llvm::orc::ExecutorAddr
Represents an address in the executor process.
Definition: ExecutorAddress.h:30
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
JITSymbol.h
Error.h
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
llvm::orc::ExecutorAddrRange
Represents an address range in the exceutor process.
Definition: ExecutorAddress.h:148
function
print Print MemDeps of function
Definition: MemDepPrinter.cpp:82
Triple.h
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155