LLVM 22.0.0git
JITLink.h File Reference

Go to the source code of this file.

Classes

 Base class for errors originating in JIT linker, e.g. More...
 Represents fixups and constraints in the LinkGraph. More...
 Base class for Addressable entities (externals, absolutes, blocks). More...
 An Addressable with content and edges. More...
 Symbol representation. More...
 Represents an object file section. More...
 Represents a section address range via a pair of Block pointers to the first and last Blocks in the section. More...
 Enables easy lookup of blocks by addresses. More...
 A map of addresses to Symbols. More...
 An LinkGraph pass configuration, consisting of a list of pre-prune, post-prune, and post-fixup passes. More...
 A function object to call with a resolved symbol map (See AsyncLookupResult) or an error if resolution failed. More...
 Holds context for a single jitLink invocation. More...

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Typedefs

using llvm::jitlink::SectionOrdinal = unsigned
using llvm::jitlink::TargetFlagsType = uint8_t
 Holds target-specific properties for a symbol.
using llvm::jitlink::LinkGraphPassFunction = unique_function<Error(LinkGraph &)>
 A function for mutating LinkGraphs.
using llvm::jitlink::LinkGraphPassList = std::vector<LinkGraphPassFunction>
 A list of LinkGraph passes.
using llvm::jitlink::AsyncLookupResult
 A map of symbol names to resolved addresses.
using llvm::jitlink::AnonymousPointerCreator
 Creates a new pointer block in the given section and returns an Anonymous symbol pointing to it.
using llvm::jitlink::PointerJumpStubCreator
 Create a jump stub that jumps via the pointer at the given symbol and an anonymous symbol pointing to it.

Enumerations

enum class  llvm::jitlink::Linkage : uint8_t { llvm::jitlink::Strong , llvm::jitlink::Weak }
 Describes symbol linkage. This can be used to resolve definition clashes. More...
enum class  llvm::jitlink::Scope : uint8_t { llvm::jitlink::Default , llvm::jitlink::Hidden , llvm::jitlink::SideEffectsOnly , llvm::jitlink::Local }
 Defines the scope in which this symbol should be visible: Default – Visible in the public interface of the linkage unit. More...
enum class  llvm::jitlink::SymbolLookupFlags { llvm::jitlink::RequiredSymbol , llvm::jitlink::WeaklyReferencedSymbol }
 Flags for symbol lookup. More...

Functions

LLVM_ABI const charllvm::jitlink::getGenericEdgeKindName (Edge::Kind K)
 Returns the string name of the given generic edge kind, or "unknown" otherwise.
uint64_t llvm::jitlink::alignToBlock (uint64_t Addr, const Block &B)
orc::ExecutorAddr llvm::jitlink::alignToBlock (orc::ExecutorAddr Addr, const Block &B)
LLVM_ABI bool llvm::jitlink::isCStringBlock (Block &B)
LLVM_ABI const charllvm::jitlink::getLinkageName (Linkage L)
 For errors and debugging output.
LLVM_ABI const charllvm::jitlink::getScopeName (Scope S)
 For debugging output.
LLVM_ABI raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const Block &B)
LLVM_ABI raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const Symbol &A)
LLVM_ABI void llvm::jitlink::printEdge (raw_ostream &OS, const Block &B, const Edge &E, StringRef EdgeKindName)
LLVM_ABI raw_ostreamllvm::jitlink::operator<< (raw_ostream &OS, const SymbolLookupFlags &LF)
template<typename Continuation>
std::unique_ptr< JITLinkAsyncLookupContinuationllvm::jitlink::createLookupContinuation (Continuation Cont)
 Create a lookup continuation from a function object.
LLVM_ABI Error llvm::jitlink::markAllSymbolsLive (LinkGraph &G)
 Marks all symbols in a graph live.
LLVM_ABI Error llvm::jitlink::makeTargetOutOfRangeError (const LinkGraph &G, const Block &B, const Edge &E)
 Create an out of range error for the given edge in the given block.
LLVM_ABI Error llvm::jitlink::makeAlignmentError (llvm::orc::ExecutorAddr Loc, uint64_t Value, int N, const Edge &E)
LLVM_ABI AnonymousPointerCreator llvm::jitlink::getAnonymousPointerCreator (const Triple &TT)
 Get target-specific AnonymousPointerCreator.
LLVM_ABI PointerJumpStubCreator llvm::jitlink::getPointerJumpStubCreator (const Triple &TT)
 Get target-specific PointerJumpStubCreator.
void llvm::jitlink::visitEdge (LinkGraph &G, Block *B, Edge &E)
 Base case for edge-visitors where the visitor-list is empty.
template<typename VisitorT, typename... VisitorTs>
void llvm::jitlink::visitEdge (LinkGraph &G, Block *B, Edge &E, VisitorT &&V, VisitorTs &&...Vs)
 Applies the first visitor in the list to the given edge.
template<typename... VisitorTs>
void llvm::jitlink::visitExistingEdges (LinkGraph &G, VisitorTs &&...Vs)
 For each edge in the given graph, apply a list of visitors to the edge, stopping when the first visitor's visitEdge method returns true.
LLVM_ABI Expected< std::unique_ptr< LinkGraph > > llvm::jitlink::createLinkGraphFromObject (MemoryBufferRef ObjectBuffer, std::shared_ptr< orc::SymbolStringPool > SSP)
 Create a LinkGraph from the given object buffer.
LLVM_ABI std::unique_ptr< LinkGraphllvm::jitlink::absoluteSymbolsLinkGraph (Triple TT, std::shared_ptr< orc::SymbolStringPool > SSP, orc::SymbolMap Symbols)
 Create a LinkGraph defining the given absolute symbols.
LLVM_ABI void llvm::jitlink::link (std::unique_ptr< LinkGraph > G, std::unique_ptr< JITLinkContext > Ctx)
 Link the given graph.