@@ -11,7 +11,7 @@ Introduction
11
11
This document aims to provide a high-level overview of the design and API
12
12
of the JITLink library. It assumes some familiarity with linking and
13
13
relocatable object files, but should not require deep expertise. If you know
14
- what a section, symbol, and relocation are you should find this document
14
+ what a section, symbol, and relocation are then you should find this document
15
15
accessible. If it is not, please submit a patch (:doc: `Contributing `) or file a
16
16
bug (:doc: `HowToSubmitABug `).
17
17
@@ -56,15 +56,15 @@ and optimizations that were not possible under MCJIT or RuntimeDyld.
56
56
ObjectLinkingLayer Plugins
57
57
--------------------------
58
58
59
- The ``ObjectLinkingLayer::Plugin `` class provides the following methods:
59
+ The ``ObjectLinkingLayer::Plugin `` class provides the following methods:
60
60
61
61
* ``modifyPassConfig `` is called each time a LinkGraph is about to be linked. It
62
62
can be overridden to install JITLink *Passes * to run during the link process.
63
63
64
64
.. code-block :: c++
65
65
66
66
void modifyPassConfig(MaterializationResponsibility &MR,
67
- const Triple &TT ,
67
+ jitlink::LinkGraph &G ,
68
68
jitlink::PassConfiguration &Config)
69
69
70
70
* ``notifyLoaded `` is called before the link begins, and can be overridden to
@@ -97,15 +97,15 @@ The ``ObjectLinkingLayer::Plugin`` class provides the following methods:
97
97
98
98
.. code-block :: c++
99
99
100
- Error notifyRemovingResources(ResourceKey K)
100
+ Error notifyRemovingResources(JITDylib &JD, ResourceKey K)
101
101
102
102
* ``notifyTransferringResources `` is called if/when a request is made to
103
103
transfer tracking of any resources associated with ``ResourceKey ``
104
104
*SrcKey * to *DstKey *.
105
105
106
106
.. code-block :: c++
107
107
108
- void notifyTransferringResources(ResourceKey DstKey,
108
+ void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey,
109
109
ResourceKey SrcKey)
110
110
111
111
Plugin authors are required to implement the ``notifyFailed ``,
@@ -126,7 +126,7 @@ calling the ``addPlugin`` method [1]_. E.g.
126
126
127
127
// Add passes to print the set of defined symbols after dead-stripping.
128
128
void modifyPassConfig(MaterializationResponsibility &MR,
129
- const Triple &TT ,
129
+ jitlink::LinkGraph &G ,
130
130
jitlink::PassConfiguration &Config) override {
131
131
Config.PostPrunePasses.push_back([this](jitlink::LinkGraph &G) {
132
132
return printAllSymbols(G);
@@ -137,10 +137,10 @@ calling the ``addPlugin`` method [1]_. E.g.
137
137
Error notifyFailed(MaterializationResponsibility &MR) override {
138
138
return Error::success();
139
139
}
140
- Error notifyRemovingResources(ResourceKey K) override {
140
+ Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override {
141
141
return Error::success();
142
142
}
143
- void notifyTransferringResources(ResourceKey DstKey,
143
+ void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey,
144
144
ResourceKey SrcKey) override {}
145
145
146
146
// JITLink pass to print all defined symbols in G.
@@ -407,7 +407,7 @@ and utilities relevant to the linking process:
407
407
* ``getPointerSize `` returns the size of a pointer (in bytes) in the executor
408
408
process.
409
409
410
- * ``getEndinaness `` returns the endianness of the executor process.
410
+ * ``getEndianness `` returns the endianness of the executor process.
411
411
412
412
* ``allocateString `` copies data from a given ``llvm::Twine `` into the
413
413
link graph's internal allocator. This can be used to ensure that content
@@ -802,7 +802,7 @@ for them by an ``ObjectLinkingLayer`` instance, but they can be created manually
802
802
``ObjectLinkingLayer `` usually creates ``LinkGraphs ``.
803
803
804
804
#. ``createLinkGraph_<Object-Format>_<Architecture> `` can be used when
805
- both the object format and architecture are known ahead of time.
805
+ both the object format and architecture are known ahead of time.
806
806
807
807
#. ``createLinkGraph_<Object-Format> `` can be used when the object format is
808
808
known ahead of time, but the architecture is not. In this case the
0 commit comments