class LinkGraph

Declaration

class LinkGraph { /* full declaration omitted */ };

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:819

Member Variables

private llvm::BumpPtrAllocator Allocator
private std::string Name
private llvm::Triple TT
private unsigned int PointerSize
private support::endianness Endianness
private llvm::jitlink::LinkGraph::GetEdgeKindNameFunction GetEdgeKindName = nullptr
private llvm::jitlink::LinkGraph::SectionList Sections
private llvm::jitlink::LinkGraph::ExternalSymbolSet ExternalSymbols
private llvm::jitlink::LinkGraph::ExternalSymbolSet AbsoluteSymbols
private orc::shared::AllocActions AAs

Method Overview

  • public LinkGraph(std::string Name, const llvm::Triple & TT, unsigned int PointerSize, support::endianness Endianness, llvm::jitlink::LinkGraph::GetEdgeKindNameFunction GetEdgeKindName)
  • public LinkGraph(const llvm::jitlink::LinkGraph &)
  • public LinkGraph(llvm::jitlink::LinkGraph &&)
  • public iterator_range<llvm::jitlink::LinkGraph::external_symbol_iterator> absolute_symbols()
  • public llvm::jitlink::Symbol & addAbsoluteSymbol(llvm::StringRef Name, orc::ExecutorAddr Address, orc::ExecutorAddrDiff Size, llvm::jitlink::Linkage L, llvm::jitlink::Scope S, bool IsLive)
  • public llvm::jitlink::Symbol & addAnonymousSymbol(llvm::jitlink::Block & Content, orc::ExecutorAddrDiff Offset, orc::ExecutorAddrDiff Size, bool IsCallable, bool IsLive)
  • public llvm::jitlink::Symbol & addCommonSymbol(llvm::StringRef Name, llvm::jitlink::Scope S, llvm::jitlink::Section & Section, orc::ExecutorAddr Address, orc::ExecutorAddrDiff Size, uint64_t Alignment, bool IsLive)
  • public llvm::jitlink::Symbol & addDefinedSymbol(llvm::jitlink::Block & Content, orc::ExecutorAddrDiff Offset, llvm::StringRef Name, orc::ExecutorAddrDiff Size, llvm::jitlink::Linkage L, llvm::jitlink::Scope S, bool IsCallable, bool IsLive)
  • public llvm::jitlink::Symbol & addExternalSymbol(llvm::StringRef Name, orc::ExecutorAddrDiff Size, llvm::jitlink::Linkage L)
  • public orc::shared::AllocActions & allocActions()
  • public MutableArrayRef<char> allocateBuffer(size_t Size)
  • public MutableArrayRef<char> allocateContent(ArrayRef<char> Source)
  • public MutableArrayRef<char> allocateString(llvm::Twine Source)
  • public iterator_range<llvm::jitlink::LinkGraph::block_iterator> blocks()
  • public iterator_range<llvm::jitlink::LinkGraph::const_block_iterator> blocks() const
  • private template <typename... ArgTs>llvm::jitlink::Addressable & createAddressable(ArgTs &&... Args)
  • private template <typename... ArgTs>llvm::jitlink::Block & createBlock(ArgTs &&... Args)
  • public llvm::jitlink::Block & createContentBlock(llvm::jitlink::Section & Parent, ArrayRef<char> Content, orc::ExecutorAddr Address, uint64_t Alignment, uint64_t AlignmentOffset)
  • public llvm::jitlink::Block & createMutableContentBlock(llvm::jitlink::Section & Parent, MutableArrayRef<char> MutableContent, orc::ExecutorAddr Address, uint64_t Alignment, uint64_t AlignmentOffset)
  • public llvm::jitlink::Section & createSection(llvm::StringRef Name, llvm::jitlink::MemProt Prot)
  • public llvm::jitlink::Block & createZeroFillBlock(llvm::jitlink::Section & Parent, orc::ExecutorAddrDiff Size, orc::ExecutorAddr Address, uint64_t Alignment, uint64_t AlignmentOffset)
  • public iterator_range<llvm::jitlink::LinkGraph::const_defined_symbol_iterator> defined_symbols() const
  • public iterator_range<llvm::jitlink::LinkGraph::defined_symbol_iterator> defined_symbols()
  • private void destroyAddressable(llvm::jitlink::Addressable & A)
  • private void destroyBlock(llvm::jitlink::Block & B)
  • private void destroySymbol(llvm::jitlink::Symbol & S)
  • public void dump(llvm::raw_ostream & OS)
  • public iterator_range<llvm::jitlink::LinkGraph::external_symbol_iterator> external_symbols()
  • public llvm::jitlink::Section * findSectionByName(llvm::StringRef Name)
  • public const char * getEdgeKindName(Edge::Kind K) const
  • public support::endianness getEndianness() const
  • public const std::string & getName() const
  • public unsigned int getPointerSize() const
  • private static iterator_range<Section::block_iterator> getSectionBlocks(llvm::jitlink::Section & S)
  • private static iterator_range<Section::const_block_iterator> getSectionConstBlocks(llvm::jitlink::Section & S)
  • private static iterator_range<Section::const_symbol_iterator> getSectionConstSymbols(llvm::jitlink::Section & S)
  • private static iterator_range<Section::symbol_iterator> getSectionSymbols(llvm::jitlink::Section & S)
  • public const llvm::Triple & getTargetTriple() const
  • public void makeAbsolute(llvm::jitlink::Symbol & Sym, orc::ExecutorAddr Address)
  • public void makeDefined(llvm::jitlink::Symbol & Sym, llvm::jitlink::Block & Content, orc::ExecutorAddrDiff Offset, orc::ExecutorAddrDiff Size, llvm::jitlink::Linkage L, llvm::jitlink::Scope S, bool IsLive)
  • public void makeExternal(llvm::jitlink::Symbol & Sym)
  • public void mergeSections(llvm::jitlink::Section & DstSection, llvm::jitlink::Section & SrcSection, bool PreserveSrcSection = false)
  • public void removeAbsoluteSymbol(llvm::jitlink::Symbol & Sym)
  • public void removeBlock(llvm::jitlink::Block & B)
  • public void removeDefinedSymbol(llvm::jitlink::Symbol & Sym)
  • public void removeExternalSymbol(llvm::jitlink::Symbol & Sym)
  • public void removeSection(llvm::jitlink::Section & Sec)
  • public iterator_range<llvm::jitlink::LinkGraph::section_iterator> sections()
  • public SectionList::size_type sections_size() const
  • public llvm::jitlink::Block & splitBlock(llvm::jitlink::Block & B, size_t SplitIndex, llvm::jitlink::LinkGraph::SplitBlockCache * Cache = nullptr)
  • public void transferBlock(llvm::jitlink::Block & B, llvm::jitlink::Section & NewSection)
  • public void transferDefinedSymbol(llvm::jitlink::Symbol & Sym, llvm::jitlink::Block & DestBlock, orc::ExecutorAddrDiff NewOffset, Optional<orc::ExecutorAddrDiff> ExplicitNewSize)

Methods

LinkGraph(
    std::string Name,
    const llvm::Triple& TT,
    unsigned int PointerSize,
    support::endianness Endianness,
    llvm::jitlink::LinkGraph::
        GetEdgeKindNameFunction GetEdgeKindName)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:948

Parameters

std::string Name
const llvm::Triple& TT
unsigned int PointerSize
support::endianness Endianness
llvm::jitlink::LinkGraph::GetEdgeKindNameFunction GetEdgeKindName

LinkGraph(const llvm::jitlink::LinkGraph&)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:954

Parameters

const llvm::jitlink::LinkGraph&

LinkGraph(llvm::jitlink::LinkGraph&&)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:956

Parameters

llvm::jitlink::LinkGraph&&

iterator_range<llvm::jitlink::LinkGraph::
                   external_symbol_iterator>
absolute_symbols()

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1189

llvm::jitlink::Symbol& addAbsoluteSymbol(
    llvm::StringRef Name,
    orc::ExecutorAddr Address,
    orc::ExecutorAddrDiff Size,
    llvm::jitlink::Linkage L,
    llvm::jitlink::Scope S,
    bool IsLive)

Description

Add an absolute symbol.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1101

Parameters

llvm::StringRef Name
orc::ExecutorAddr Address
orc::ExecutorAddrDiff Size
llvm::jitlink::Linkage L
llvm::jitlink::Scope S
bool IsLive

llvm::jitlink::Symbol& addAnonymousSymbol(
    llvm::jitlink::Block& Content,
    orc::ExecutorAddrDiff Offset,
    orc::ExecutorAddrDiff Size,
    bool IsCallable,
    bool IsLive)

Description

Add an anonymous symbol.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1134

Parameters

llvm::jitlink::Block& Content
orc::ExecutorAddrDiff Offset
orc::ExecutorAddrDiff Size
bool IsCallable
bool IsLive

llvm::jitlink::Symbol& addCommonSymbol(
    llvm::StringRef Name,
    llvm::jitlink::Scope S,
    llvm::jitlink::Section& Section,
    orc::ExecutorAddr Address,
    orc::ExecutorAddrDiff Size,
    uint64_t Alignment,
    bool IsLive)

Description

Convenience method for adding a weak zero-fill symbol.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1117

Parameters

llvm::StringRef Name
llvm::jitlink::Scope S
llvm::jitlink::Section& Section
orc::ExecutorAddr Address
orc::ExecutorAddrDiff Size
uint64_t Alignment
bool IsLive

llvm::jitlink::Symbol& addDefinedSymbol(
    llvm::jitlink::Block& Content,
    orc::ExecutorAddrDiff Offset,
    llvm::StringRef Name,
    orc::ExecutorAddrDiff Size,
    llvm::jitlink::Linkage L,
    llvm::jitlink::Scope S,
    bool IsCallable,
    bool IsLive)

Description

Add a named symbol.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1144

Parameters

llvm::jitlink::Block& Content
orc::ExecutorAddrDiff Offset
llvm::StringRef Name
orc::ExecutorAddrDiff Size
llvm::jitlink::Linkage L
llvm::jitlink::Scope S
bool IsCallable
bool IsLive

llvm::jitlink::Symbol& addExternalSymbol(
    llvm::StringRef Name,
    orc::ExecutorAddrDiff Size,
    llvm::jitlink::Linkage L)

Description

Add an external symbol. Some formats (e.g. ELF) allow Symbols to have sizes. For Symbols whose size is not known, you should substitute '0'. For external symbols Linkage determines whether the symbol must be present during lookup: Externals with strong linkage must be found or an error will be emitted. Externals with weak linkage are permitted to be undefined, in which case they are assigned a value of 0.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1086

Parameters

llvm::StringRef Name
orc::ExecutorAddrDiff Size
llvm::jitlink::Linkage L

orc::shared::AllocActions& allocActions()

Description

Accessor for the AllocActions object for this graph. This can be used to register allocation action calls prior to finalization. Accessing this object after finalization will result in undefined behavior.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1409

MutableArrayRef<char> allocateBuffer(size_t Size)

Description

Allocate a mutable buffer of the given size using the LinkGraph's allocator.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:976

Parameters

size_t Size

MutableArrayRef<char> allocateContent(
    ArrayRef<char> Source)

Description

Allocate a copy of the given string using the LinkGraph's allocator. This can be useful when renaming symbols or adding new content to the graph.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:983

Parameters

ArrayRef<char> Source

MutableArrayRef<char> allocateString(
    llvm::Twine Source)

Description

Allocate a copy of the given string using the LinkGraph's allocator. This can be useful when renaming symbols or adding new content to the graph. Note: This Twine-based overload requires an extra string copy and an extra heap allocation for large strings. The ArrayRef <char > overload should be preferred where possible.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:996

Parameters

llvm::Twine Source

iterator_range<
    llvm::jitlink::LinkGraph::block_iterator>
blocks()

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1175

iterator_range<llvm::jitlink::LinkGraph::
                   const_block_iterator>
blocks() const

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1180

template <typename... ArgTs>
llvm::jitlink::Addressable& createAddressable(
    ArgTs&&... Args)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:826

Templates

ArgTs

Parameters

ArgTs&&... Args

template <typename... ArgTs>
llvm::jitlink::Block& createBlock(ArgTs&&... Args)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:838

Templates

ArgTs

Parameters

ArgTs&&... Args

llvm::jitlink::Block& createContentBlock(
    llvm::jitlink::Section& Parent,
    ArrayRef<char> Content,
    orc::ExecutorAddr Address,
    uint64_t Alignment,
    uint64_t AlignmentOffset)

Description

Create a content block.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1017

Parameters

llvm::jitlink::Section& Parent
ArrayRef<char> Content
orc::ExecutorAddr Address
uint64_t Alignment
uint64_t AlignmentOffset

llvm::jitlink::Block& createMutableContentBlock(
    llvm::jitlink::Section& Parent,
    MutableArrayRef<char> MutableContent,
    orc::ExecutorAddr Address,
    uint64_t Alignment,
    uint64_t AlignmentOffset)

Description

Create a content block with initially mutable data.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1024

Parameters

llvm::jitlink::Section& Parent
MutableArrayRef<char> MutableContent
orc::ExecutorAddr Address
uint64_t Alignment
uint64_t AlignmentOffset

llvm::jitlink::Section& createSection(
    llvm::StringRef Name,
    llvm::jitlink::MemProt Prot)

Description

Create a section with the given name, protection flags, and alignment.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1005

Parameters

llvm::StringRef Name
llvm::jitlink::MemProt Prot

llvm::jitlink::Block& createZeroFillBlock(
    llvm::jitlink::Section& Parent,
    orc::ExecutorAddrDiff Size,
    orc::ExecutorAddr Address,
    uint64_t Alignment,
    uint64_t AlignmentOffset)

Description

Create a zero-fill block.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1034

Parameters

llvm::jitlink::Section& Parent
orc::ExecutorAddrDiff Size
orc::ExecutorAddr Address
uint64_t Alignment
uint64_t AlignmentOffset

iterator_range<llvm::jitlink::LinkGraph::
                   const_defined_symbol_iterator>
defined_symbols() const

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1198

iterator_range<llvm::jitlink::LinkGraph::
                   defined_symbol_iterator>
defined_symbols()

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1193

void destroyAddressable(
    llvm::jitlink::Addressable& A)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:833

Parameters

llvm::jitlink::Addressable& A

void destroyBlock(llvm::jitlink::Block& B)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:845

Parameters

llvm::jitlink::Block& B

void destroySymbol(llvm::jitlink::Symbol& S)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:850

Parameters

llvm::jitlink::Symbol& S

void dump(llvm::raw_ostream& OS)

Description

Dump the graph.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1412

Parameters

llvm::raw_ostream& OS

iterator_range<llvm::jitlink::LinkGraph::
                   external_symbol_iterator>
external_symbols()

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1185

llvm::jitlink::Section* findSectionByName(
    llvm::StringRef Name)

Description

Returns the section with the given name if it exists, otherwise returns null.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1168

Parameters

llvm::StringRef Name

const char* getEdgeKindName(Edge::Kind K) const

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:972

Parameters

Edge::Kind K

support::endianness getEndianness() const

Description

Returns the endianness of content in this graph.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:970

const std::string& getName() const

Description

Returns the name of this graph (usually the name of the original underlying MemoryBuffer).

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:961

unsigned int getPointerSize() const

Description

Returns the pointer size for use in this graph.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:967

static iterator_range<Section::block_iterator>
getSectionBlocks(llvm::jitlink::Section& S)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:855

Parameters

llvm::jitlink::Section& S

static iterator_range<
    Section::const_block_iterator>
getSectionConstBlocks(llvm::jitlink::Section& S)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:860

Parameters

llvm::jitlink::Section& S

static iterator_range<
    Section::const_symbol_iterator>
getSectionConstSymbols(llvm::jitlink::Section& S)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:870

Parameters

llvm::jitlink::Section& S

static iterator_range<Section::symbol_iterator>
getSectionSymbols(llvm::jitlink::Section& S)

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:865

Parameters

llvm::jitlink::Section& S

const llvm::Triple& getTargetTriple() const

Description

Returns the target triple for this Graph.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:964

void makeAbsolute(llvm::jitlink::Symbol& Sym,
                  orc::ExecutorAddr Address)

Description

Make the given symbol an absolute with the given address (must not already be absolute). The symbol's size, linkage, and callability, and liveness will be left unchanged, and its offset will be reset to 0. If the symbol was external then its scope will be set to local, otherwise it will be left unchanged.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1233

Parameters

llvm::jitlink::Symbol& Sym
orc::ExecutorAddr Address

void makeDefined(llvm::jitlink::Symbol& Sym,
                 llvm::jitlink::Block& Content,
                 orc::ExecutorAddrDiff Offset,
                 orc::ExecutorAddrDiff Size,
                 llvm::jitlink::Linkage L,
                 llvm::jitlink::Scope S,
                 bool IsLive)

Description

Turn an absolute or external symbol into a defined one by attaching it to a block. Symbol must not already be defined.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1253

Parameters

llvm::jitlink::Symbol& Sym
llvm::jitlink::Block& Content
orc::ExecutorAddrDiff Offset
orc::ExecutorAddrDiff Size
llvm::jitlink::Linkage L
llvm::jitlink::Scope S
bool IsLive

void makeExternal(llvm::jitlink::Symbol& Sym)

Description

Make the given symbol external (must not already be external). Symbol size, linkage and callability will be left unchanged. Symbol scope will be set to Default, and offset will be reset to 0.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1208

Parameters

llvm::jitlink::Symbol& Sym

void mergeSections(
    llvm::jitlink::Section& DstSection,
    llvm::jitlink::Section& SrcSection,
    bool PreserveSrcSection = false)

Description

Move all blocks and symbols from the source section to the destination section. If PreserveSrcSection is true (or SrcSection and DstSection are the same) then SrcSection is preserved, otherwise it is removed (the default).

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1333

Parameters

llvm::jitlink::Section& DstSection
llvm::jitlink::Section& SrcSection
bool PreserveSrcSection = false

void removeAbsoluteSymbol(
    llvm::jitlink::Symbol& Sym)

Description

Remove an absolute symbol. Also removes the underlying Addressable.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1360

Parameters

llvm::jitlink::Symbol& Sym

void removeBlock(llvm::jitlink::Block& B)

Description

Remove a block. The block reference is defunct after calling this function and should no longer be used.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1384

Parameters

llvm::jitlink::Block& B

void removeDefinedSymbol(
    llvm::jitlink::Symbol& Sym)

Description

Removes defined symbols. Does not remove the underlying block.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1376

Parameters

llvm::jitlink::Symbol& Sym

void removeExternalSymbol(
    llvm::jitlink::Symbol& Sym)

Description

Removes an external symbol. Also removes the underlying Addressable.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1345

Parameters

llvm::jitlink::Symbol& Sym

void removeSection(llvm::jitlink::Section& Sec)

Description

Remove a section. The section reference is defunct after calling this function and should no longer be used.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1396

Parameters

llvm::jitlink::Section& Sec

iterator_range<
    llvm::jitlink::LinkGraph::section_iterator>
sections()

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1159

SectionList::size_type sections_size() const

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1164

llvm::jitlink::Block& splitBlock(
    llvm::jitlink::Block& B,
    size_t SplitIndex,
    llvm::jitlink::LinkGraph::SplitBlockCache*
        Cache = nullptr)

Description

Splits block B at the given index which must be greater than zero. If SplitIndex == B.getSize() then this function is a no-op and returns B. If SplitIndex < B.getSize() then this function returns a new block covering the range [ 0, SplitIndex ), and B is modified to cover the range [ SplitIndex, B.size() ). The optional Cache parameter can be used to speed up repeated calls to splitBlock for a single block. If the value is None the cache will be treated as uninitialized and splitBlock will populate it. Otherwise it is assumed to contain the list of Symbols pointing at B, sorted in descending order of offset. Notes: 1. splitBlock must be used with care. Splitting a block may cause incoming edges to become invalid if the edge target subexpression points outside the bounds of the newly split target block (E.g. an edge 'S + 10 : Pointer64' where S points to a newly split block whose size is less than 10). No attempt is made to detect invalidation of incoming edges, as in general this requires context that the LinkGraph does not have. Clients are responsible for ensuring that splitBlock is not used in a way that invalidates edges. 2. The newly introduced block will have a new ordinal which will be higher than any other ordinals in the section. Clients are responsible for re-assigning block ordinals to restore a compatible order if needed. 3. The cache is not automatically updated if new symbols are introduced between calls to splitBlock. Any newly introduced symbols may be added to the cache manually (descending offset order must be preserved), or the cache can be set to None and rebuilt by splitBlock on the next call.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1076

Parameters

llvm::jitlink::Block& B
size_t SplitIndex
llvm::jitlink::LinkGraph::SplitBlockCache* Cache = nullptr

void transferBlock(
    llvm::jitlink::Block& B,
    llvm::jitlink::Section& NewSection)

Description

Transfers the given Block and all Symbols pointing to it to the given Section. No attempt is made to check compatibility of the source and destination sections. Blocks may be moved between sections with incompatible permissions (e.g. from data to text). The client is responsible for ensuring that this is safe.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1312

Parameters

llvm::jitlink::Block& B
llvm::jitlink::Section& NewSection

void transferDefinedSymbol(
    llvm::jitlink::Symbol& Sym,
    llvm::jitlink::Block& DestBlock,
    orc::ExecutorAddrDiff NewOffset,
    Optional<orc::ExecutorAddrDiff>
        ExplicitNewSize)

Description

Transfer a defined symbol from one block to another. The symbol's offset within DestBlock is set to NewOffset. If ExplicitNewSize is given as None then the size of the symbol will be checked and auto-truncated to at most the size of the remainder (from the given offset) of the size of the new block. All other symbol attributes are unchanged.

Declared at: llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h:1286

Parameters

llvm::jitlink::Symbol& Sym
llvm::jitlink::Block& DestBlock
orc::ExecutorAddrDiff NewOffset
Optional<orc::ExecutorAddrDiff> ExplicitNewSize