LLVM: lib/ExecutionEngine/JITLink/SEHFrameSupport.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_EXECUTIONENGINE_JITLINK_SEHFRAMESUPPORT_H
14#define LLVM_EXECUTIONENGINE_JITLINK_SEHFRAMESUPPORT_H
15
21
22namespace llvm {
24
25
27public:
29 : SEHFrameSectionName(SEHFrameSectionName) {}
30
32 auto *S = G.findSectionByName(SEHFrameSectionName);
33 if (!S)
35
36
37
38
39
40 for (auto *B : S->blocks()) {
41 auto &DummySymbol = G.addAnonymousSymbol(*B, 0, 0, false, false);
43 for (auto &E : B->edges()) {
44 auto &Sym = E.getTarget();
45 if (!Sym.isDefined())
46 continue;
47 Children.insert(&Sym.getBlock());
48 }
49 for (auto *Child : Children)
50 Child->addEdge(Edge(Edge::KeepAlive, 0, DummySymbol, 0));
51 }
53 }
54
55private:
57};
58
59}
60}
61
62#endif
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
std::pair< BasicBlock *, BasicBlock * > Edge
This file implements a set that has insertion order iteration characteristics.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
A vector that has set insertion semantics.
StringRef - Represent a constant reference to a string, i.e.
Error operator()(LinkGraph &G)
Definition SEHFrameSupport.h:31
SEHFrameKeepAlivePass(StringRef SEHFrameSectionName)
Definition SEHFrameSupport.h:28
This is an optimization pass for GlobalISel generic memory operations.