LLVM  10.0.0svn
Public Types | Public Member Functions | Friends | List of all members
llvm::jitlink::Section Class Reference

Represents an object file section. More...

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

Public Types

using atom_iterator = DefinedAtomSet::iterator
 
using const_atom_iterator = DefinedAtomSet::const_iterator
 

Public Member Functions

 ~Section ()
 
StringRef getName () const
 
uint32_t getAlignment () const
 
sys::Memory::ProtectionFlags getProtectionFlags () const
 
unsigned getSectionOrdinal () const
 
size_t getNextAtomOrdinal ()
 
bool isZeroFill () const
 
iterator_range< atom_iteratoratoms ()
 Returns an iterator over the atoms in the section (in no particular order). More...
 
iterator_range< const_atom_iteratoratoms () const
 Returns an iterator over the atoms in the section (in no particular order). More...
 
DefinedAtomSet::size_type atoms_size ()
 Return the number of atoms in this section. More...
 
bool atoms_empty () const
 Return true if this section contains no atoms. More...
 
SectionRange getRange () const
 Returns the range of this section as the pair of atoms with the lowest and highest target address. More...
 

Friends

class AtomGraph
 

Detailed Description

Represents an object file section.

Definition at line 265 of file JITLink.h.

Member Typedef Documentation

◆ atom_iterator

Definition at line 279 of file JITLink.h.

◆ const_atom_iterator

Definition at line 280 of file JITLink.h.

Constructor & Destructor Documentation

◆ ~Section()

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

Definition at line 99 of file JITLink.cpp.

Member Function Documentation

◆ atoms() [1/2]

iterator_range<atom_iterator> llvm::jitlink::Section::atoms ( )
inline

Returns an iterator over the atoms in the section (in no particular order).

Definition at line 293 of file JITLink.h.

References llvm::make_range().

◆ atoms() [2/2]

iterator_range<const_atom_iterator> llvm::jitlink::Section::atoms ( ) const
inline

Returns an iterator over the atoms in the section (in no particular order).

Definition at line 299 of file JITLink.h.

References llvm::make_range().

◆ atoms_empty()

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

Return true if this section contains no atoms.

Definition at line 307 of file JITLink.h.

References assert(), and Name.

◆ atoms_size()

DefinedAtomSet::size_type llvm::jitlink::Section::atoms_size ( )
inline

Return the number of atoms in this section.

Definition at line 304 of file JITLink.h.

◆ getAlignment()

uint32_t llvm::jitlink::Section::getAlignment ( ) const
inline

Definition at line 284 of file JITLink.h.

◆ getName()

StringRef llvm::jitlink::Section::getName ( ) const
inline

Definition at line 283 of file JITLink.h.

References Name.

Referenced by llvm::jitlink::MachOAtomGraphBuilder::MachOSection::getName().

◆ getNextAtomOrdinal()

size_t llvm::jitlink::Section::getNextAtomOrdinal ( )
inline

Definition at line 287 of file JITLink.h.

◆ getProtectionFlags()

sys::Memory::ProtectionFlags llvm::jitlink::Section::getProtectionFlags ( ) const
inline

Definition at line 285 of file JITLink.h.

◆ getRange()

SectionRange llvm::jitlink::Section::getRange ( ) const
inline

Returns the range of this section as the pair of atoms with the lowest and highest target address.

This operation is expensive, as it must traverse all atoms in the section.

Note: If the section is empty, both values will be null. The section address will evaluate to null, and the size to zero. If the section contains a single atom both values will point to it, the address will evaluate to the address of that atom, and the size will be the size of that atom.

Definition at line 456 of file JITLink.h.

References llvm::jitlink::Atom::getAddress().

◆ getSectionOrdinal()

unsigned llvm::jitlink::Section::getSectionOrdinal ( ) const
inline

Definition at line 286 of file JITLink.h.

◆ isZeroFill()

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

Friends And Related Function Documentation

◆ AtomGraph

friend class AtomGraph
friend

Definition at line 266 of file JITLink.h.


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