LLVM 22.0.0git
llvm::jitlink::Section Class Reference

Represents an object file section. More...

#include "llvm/ExecutionEngine/JITLink/JITLink.h"

Public Types

using symbol_iterator = SymbolSet::iterator
using const_symbol_iterator = SymbolSet::const_iterator
using block_iterator = BlockSet::iterator
using const_block_iterator = BlockSet::const_iterator

Public Member Functions

LLVM_ABI ~Section ()
 Section (const Section &)=delete
Sectionoperator= (const Section &)=delete
 Section (Section &&)=delete
Sectionoperator= (Section &&)=delete
StringRef getName () const
 Returns the name of this section.
orc::MemProt getMemProt () const
 Returns the protection flags for this section.
void setMemProt (orc::MemProt Prot)
 Set the protection flags for this section.
orc::MemLifetime getMemLifetime () const
 Get the memory lifetime policy for this section.
void setMemLifetime (orc::MemLifetime ML)
 Set the memory lifetime policy for this section.
SectionOrdinal getOrdinal () const
 Returns the ordinal for this section.
void setOrdinal (SectionOrdinal SecOrdinal)
 Set the ordinal for this section.
bool empty () const
 Returns true if this section is empty (contains no blocks or symbols).
iterator_range< block_iteratorblocks ()
 Returns an iterator over the blocks defined in this section.
iterator_range< const_block_iteratorblocks () const
 Returns an iterator over the blocks defined in this section.
BlockSet::size_type blocks_size () const
 Returns the number of blocks in this section.
iterator_range< symbol_iteratorsymbols ()
 Returns an iterator over the symbols defined in this section.
iterator_range< const_symbol_iteratorsymbols () const
 Returns an iterator over the symbols defined in this section.
SymbolSet::size_type symbols_size () const
 Return the number of symbols in this section.

Friends

class LinkGraph

Detailed Description

Represents an object file section.

Definition at line 718 of file JITLink.h.

Member Typedef Documentation

◆ block_iterator

◆ const_block_iterator

◆ const_symbol_iterator

◆ symbol_iterator

Constructor & Destructor Documentation

◆ ~Section()

llvm::jitlink::Section::~Section ( )

Definition at line 164 of file JITLink.cpp.

References B().

◆ Section() [1/2]

llvm::jitlink::Section::Section ( const Section & )
delete

◆ Section() [2/2]

llvm::jitlink::Section::Section ( Section && )
delete

Member Function Documentation

◆ blocks() [1/2]

◆ blocks() [2/2]

iterator_range< const_block_iterator > llvm::jitlink::Section::blocks ( ) const
inline

Returns an iterator over the blocks defined in this section.

Definition at line 774 of file JITLink.h.

References llvm::make_range().

◆ blocks_size()

BlockSet::size_type llvm::jitlink::Section::blocks_size ( ) const
inline

◆ empty()

bool llvm::jitlink::Section::empty ( ) const
inline

Returns true if this section is empty (contains no blocks or symbols).

Definition at line 766 of file JITLink.h.

Referenced by llvm::jitlink::CompactUnwindManager< CURecTraits >::prepareForPrune(), and llvm::jitlink::CompactUnwindManager< CURecTraits >::writeUnwindInfo().

◆ getMemLifetime()

orc::MemLifetime llvm::jitlink::Section::getMemLifetime ( ) const
inline

Get the memory lifetime policy for this section.

Definition at line 753 of file JITLink.h.

◆ getMemProt()

orc::MemProt llvm::jitlink::Section::getMemProt ( ) const
inline

Returns the protection flags for this section.

Definition at line 747 of file JITLink.h.

Referenced by llvm::jitlink::shouldRelax().

◆ getName()

◆ getOrdinal()

SectionOrdinal llvm::jitlink::Section::getOrdinal ( ) const
inline

Returns the ordinal for this section.

Definition at line 759 of file JITLink.h.

Referenced by getMethodBatch(), and llvm::jitlink::getOrCreateLocalMachOHeader().

◆ operator=() [1/2]

Section & llvm::jitlink::Section::operator= ( const Section & )
delete

◆ operator=() [2/2]

Section & llvm::jitlink::Section::operator= ( Section && )
delete

◆ setMemLifetime()

void llvm::jitlink::Section::setMemLifetime ( orc::MemLifetime ML)
inline

Set the memory lifetime policy for this section.

Definition at line 756 of file JITLink.h.

Referenced by llvm::jitlink::CompactUnwindManager< CURecTraits >::processAndReserveUnwindInfo().

◆ setMemProt()

void llvm::jitlink::Section::setMemProt ( orc::MemProt Prot)
inline

Set the protection flags for this section.

Definition at line 750 of file JITLink.h.

◆ setOrdinal()

void llvm::jitlink::Section::setOrdinal ( SectionOrdinal SecOrdinal)
inline

Set the ordinal for this section.

Ordinals are used to order the layout of sections with the same permissions.

Definition at line 763 of file JITLink.h.

Referenced by llvm::jitlink::getOrCreateLocalMachOHeader().

◆ symbols() [1/2]

iterator_range< symbol_iterator > llvm::jitlink::Section::symbols ( )
inline

Returns an iterator over the symbols defined in this section.

Definition at line 782 of file JITLink.h.

References llvm::make_range().

Referenced by llvm::jitlink::getOrCreateLocalMachOHeader(), llvm::jitlink::makeTargetOutOfRangeError(), and llvm::jitlink::DWARFRecordSectionSplitter::operator()().

◆ symbols() [2/2]

iterator_range< const_symbol_iterator > llvm::jitlink::Section::symbols ( ) const
inline

Returns an iterator over the symbols defined in this section.

Definition at line 787 of file JITLink.h.

References llvm::make_range().

◆ symbols_size()

SymbolSet::size_type llvm::jitlink::Section::symbols_size ( ) const
inline

Return the number of symbols in this section.

Definition at line 792 of file JITLink.h.

Referenced by llvm::jitlink::getOrCreateLocalMachOHeader().

◆ LinkGraph

friend class LinkGraph
friend

Definition at line 719 of file JITLink.h.

References LinkGraph.

Referenced by LinkGraph.


The documentation for this class was generated from the following files: