1 | //===--------- DWARFRecordSectionSplitter.h - JITLink -----------*- 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 | #ifndef LLVM_EXECUTIONENGINE_JITLINK_DWARFRECORDSECTIONSPLITTER_H |
10 | #define LLVM_EXECUTIONENGINE_JITLINK_DWARFRECORDSECTIONSPLITTER_H |
11 | |
12 | #include "llvm/ExecutionEngine/JITLink/JITLink.h" |
13 | |
14 | namespace llvm { |
15 | namespace jitlink { |
16 | |
17 | /// A LinkGraph pass that splits blocks in a section that follows the DWARF |
18 | /// Record format into sub-blocks where each header gets its own block. |
19 | /// When splitting EHFrames, DWARFRecordSectionSplitter should not be run |
20 | /// without EHFrameEdgeFixer, which is responsible for adding FDE-to-CIE edges. |
21 | class DWARFRecordSectionSplitter { |
22 | public: |
23 | DWARFRecordSectionSplitter(StringRef SectionName); |
24 | Error operator()(LinkGraph &G); |
25 | |
26 | private: |
27 | Error processBlock(LinkGraph &G, Block &B, LinkGraph::SplitBlockCache &Cache); |
28 | |
29 | StringRef SectionName; |
30 | }; |
31 | |
32 | } // namespace jitlink |
33 | } // namespace llvm |
34 | |
35 | #endif // LLVM_EXECUTIONENGINE_JITLINK_DWARFRECORDSECTIONSPLITTER_H |
36 | |