LLVM: llvm::orc::LinkGraphLinkingLayer Class Reference (original) (raw)
LinkGraphLinkingLayer links LinkGraphs into the Executor using JITLink. More...
#include "[llvm/ExecutionEngine/Orc/LinkGraphLinkingLayer.h](LinkGraphLinkingLayer%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LinkGraphLinkingLayer (ExecutionSession &ES) | |
| Construct a LinkGraphLinkingLayer using the ExecutorProcessControl instance's memory manager. | |
| LinkGraphLinkingLayer (ExecutionSession &ES, jitlink::JITLinkMemoryManager &MemMgr) | |
| Construct a LinkGraphLinkingLayer using a custom memory manager. | |
| LinkGraphLinkingLayer (ExecutionSession &ES, std::unique_ptr< jitlink::JITLinkMemoryManager > MemMgr) | |
| Construct an LinkGraphLinkingLayer. | |
| ~LinkGraphLinkingLayer () override | |
| Destroy the LinkGraphLinkingLayer. | |
| LinkGraphLinkingLayer & | addPlugin (std::shared_ptr< Plugin > P) |
| Add a plugin. | |
| void | removePlugin (Plugin &P) |
| Remove a plugin. | |
| void | emit (std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< jitlink::LinkGraph > G) override |
| Emit a LinkGraph. | |
| LinkGraphLinkingLayer & | setOverrideObjectFlagsWithResponsibilityFlags (bool OverrideObjectFlags) |
| Instructs this LinkgraphLinkingLayer instance to override the symbol flags found in the LinkGraph with the flags supplied by the MaterializationResponsibility instance. | |
| LinkGraphLinkingLayer & | setAutoClaimResponsibilityForObjectSymbols (bool AutoClaimObjectSymbols) |
| If set, this LinkGraphLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance. | |
| Public Member Functions inherited from llvm::orc::LinkGraphLayer | |
| LinkGraphLayer (ExecutionSession &ES) | |
| virtual | ~LinkGraphLayer () |
| ExecutionSession & | getExecutionSession () |
| virtual Error | add (ResourceTrackerSP RT, std::unique_ptr< jitlink::LinkGraph > G, MaterializationUnit::Interface I) |
| Adds a LinkGraph to the JITDylib for the given ResourceTracker. | |
| Error | add (ResourceTrackerSP RT, std::unique_ptr< jitlink::LinkGraph > G) |
| Adds a LinkGraph to the JITDylib for the given ResourceTracker. | |
| Error | add (JITDylib &JD, std::unique_ptr< jitlink::LinkGraph > G, MaterializationUnit::Interface I) |
| Adds a LinkGraph to the given JITDylib. | |
| Error | add (JITDylib &JD, std::unique_ptr< jitlink::LinkGraph > G) |
| Adds a LinkGraph to the given JITDylib. | |
| MaterializationUnit::Interface | getInterface (jitlink::LinkGraph &G) |
| Get the interface for the given LinkGraph. |
| Protected Attributes | |
|---|---|
| std::function< void(std::unique_ptr< MemoryBuffer >)> | ReturnObjectBuffer |
LinkGraphLinkingLayer links LinkGraphs into the Executor using JITLink.
Clients can use this class to add LinkGraphs to an ExecutionSession, and it serves as a base for the ObjectLinkingLayer that can link object files.
Definition at line 44 of file LinkGraphLinkingLayer.h.
| llvm::orc::LinkGraphLinkingLayer::LinkGraphLinkingLayer | ( | ExecutionSession & | ES | ) |
|---|
◆ LinkGraphLinkingLayer() [2/3]
◆ LinkGraphLinkingLayer() [3/3]
◆ ~LinkGraphLinkingLayer()
| llvm::orc::LinkGraphLinkingLayer::~LinkGraphLinkingLayer ( ) | override |
|---|
◆ addPlugin()
◆ emit() [1/2]
◆ emit() [2/2]
Emit a LinkGraph with the given backing buffer.
This overload is intended for use by ObjectLinkingLayer.
References G.
◆ removePlugin()
| void llvm::orc::LinkGraphLinkingLayer::removePlugin ( Plugin & P) | inline |
|---|
Remove a plugin.
This remove applies only to subsequent links (links already underway will continue to use the plugin), and does not of itself destroy the plugin – destruction will happen once all shared pointers (including those held by in-progress links) are destroyed.
Definition at line 104 of file LinkGraphLinkingLayer.h.
References assert(), llvm::find_if(), I, and P.
◆ setAutoClaimResponsibilityForObjectSymbols()
| LinkGraphLinkingLayer & llvm::orc::LinkGraphLinkingLayer::setAutoClaimResponsibilityForObjectSymbols ( bool AutoClaimObjectSymbols) | inline |
|---|
If set, this LinkGraphLinkingLayer instance will claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance.
Setting this flag allows higher-level program representations (e.g. LLVM IR) to be added based on only a subset of the symbols they provide, without having to write intervening layers to scan and add the additional symbols. This trades diagnostic quality for convenience however: If all symbols are enumerated up-front then clashes can be detected and reported early (and usually deterministically). If this option is set, clashes for the additional symbols may not be detected until late, and detection may depend on the flow of control through JIT'd code. Use with care.
Definition at line 143 of file LinkGraphLinkingLayer.h.
◆ setOverrideObjectFlagsWithResponsibilityFlags()
| LinkGraphLinkingLayer & llvm::orc::LinkGraphLinkingLayer::setOverrideObjectFlagsWithResponsibilityFlags ( bool OverrideObjectFlags) | inline |
|---|
Instructs this LinkgraphLinkingLayer instance to override the symbol flags found in the LinkGraph with the flags supplied by the MaterializationResponsibility instance.
This is a workaround to support symbol visibility in COFF, which does not use the libObject's SF_Exported flag. Use only when generating / adding COFF object files.
FIXME: We should be able to remove this if/when COFF properly tracks exported symbols.
Definition at line 126 of file LinkGraphLinkingLayer.h.
◆ ReturnObjectBuffer
| std::function<void(std::unique_ptr<MemoryBuffer>)> llvm::orc::LinkGraphLinkingLayer::ReturnObjectBuffer | protected |
|---|
The documentation for this class was generated from the following files:
- include/llvm/ExecutionEngine/Orc/LinkGraphLinkingLayer.h
- lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp