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

An Addressable with content and edges. More...

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

Inheritance diagram for llvm::jitlink::Block:
Inheritance graph
[legend]
Collaboration diagram for llvm::jitlink::Block:
Collaboration graph
[legend]

Public Types

using EdgeVector = std::vector< Edge >
 
using edge_iterator = EdgeVector::iterator
 
using const_edge_iterator = EdgeVector::const_iterator
 

Public Member Functions

 Block (const Block &)=delete
 
Blockoperator= (const Block &)=delete
 
 Block (Block &&)=delete
 
Blockoperator= (Block &&)=delete
 
SectiongetSection () const
 Return the parent section for this block. More...
 
BlockOrdinal getOrdinal () const
 Return the ordinal for this block. More...
 
bool isZeroFill () const
 Returns true if this is a zero-fill block. More...
 
size_t getSize () const
 Returns the size of this defined addressable. More...
 
StringRef getContent () const
 Get the content for this block. Block must not be a zero-fill block. More...
 
void setContent (StringRef Content)
 Set the content for this block. More...
 
uint64_t getAlignment () const
 Get the alignment for this content. More...
 
uint64_t getAlignmentOffset () const
 Get the alignment offset for this content. More...
 
void addEdge (Edge::Kind K, Edge::OffsetT Offset, Symbol &Target, Edge::AddendT Addend)
 Add an edge to this block. More...
 
iterator_range< edge_iteratoredges ()
 Return the list of edges attached to this content. More...
 
iterator_range< const_edge_iteratoredges () const
 Returns the list of edges attached to this content. More...
 
size_t edges_size () const
 Return the size of the edges list. More...
 
bool edges_empty () const
 Returns true if the list of edges is empty. More...
 

Friends

class LinkGraph
 

Additional Inherited Members

Detailed Description

An Addressable with content and edges.

Definition at line 137 of file JITLink.h.

Member Typedef Documentation

◆ const_edge_iterator

using llvm::jitlink::Block::const_edge_iterator = EdgeVector::const_iterator

Definition at line 172 of file JITLink.h.

◆ edge_iterator

using llvm::jitlink::Block::edge_iterator = EdgeVector::iterator

Definition at line 171 of file JITLink.h.

◆ EdgeVector

using llvm::jitlink::Block::EdgeVector = std::vector<Edge>

Definition at line 170 of file JITLink.h.

Constructor & Destructor Documentation

◆ Block() [1/2]

llvm::jitlink::Block::Block ( const Block )
delete

◆ Block() [2/2]

llvm::jitlink::Block::Block ( Block &&  )
delete

Member Function Documentation

◆ addEdge()

void llvm::jitlink::Block::addEdge ( Edge::Kind  K,
Edge::OffsetT  Offset,
Symbol Target,
Edge::AddendT  Addend 
)
inline

Add an edge to this block.

Definition at line 215 of file JITLink.h.

Referenced by llvm::jitlink::MachOLinkGraphBuilder::MachOEHFrameBinaryParser::createFDERecord().

◆ edges() [1/2]

iterator_range<edge_iterator> llvm::jitlink::Block::edges ( )
inline

Return the list of edges attached to this content.

Definition at line 221 of file JITLink.h.

References llvm::make_range().

◆ edges() [2/2]

iterator_range<const_edge_iterator> llvm::jitlink::Block::edges ( ) const
inline

Returns the list of edges attached to this content.

Definition at line 226 of file JITLink.h.

References llvm::make_range().

◆ edges_empty()

bool llvm::jitlink::Block::edges_empty ( ) const
inline

Returns true if the list of edges is empty.

Definition at line 234 of file JITLink.h.

References llvm::Data.

◆ edges_size()

size_t llvm::jitlink::Block::edges_size ( ) const
inline

Return the size of the edges list.

Definition at line 231 of file JITLink.h.

◆ getAlignment()

uint64_t llvm::jitlink::Block::getAlignment ( ) const
inline

Get the alignment for this content.

Definition at line 209 of file JITLink.h.

Referenced by llvm::jitlink::JITLinkerBase::alignToBlock(), and llvm::jitlink::operator<<().

◆ getAlignmentOffset()

uint64_t llvm::jitlink::Block::getAlignmentOffset ( ) const
inline

Get the alignment offset for this content.

Definition at line 212 of file JITLink.h.

Referenced by llvm::jitlink::JITLinkerBase::alignToBlock(), and llvm::jitlink::operator<<().

◆ getContent()

StringRef llvm::jitlink::Block::getContent ( ) const
inline

Get the content for this block. Block must not be a zero-fill block.

Definition at line 195 of file JITLink.h.

References assert(), and llvm::Data.

◆ getOrdinal()

BlockOrdinal llvm::jitlink::Block::getOrdinal ( ) const
inline

Return the ordinal for this block.

Definition at line 183 of file JITLink.h.

◆ getSection()

Section& llvm::jitlink::Block::getSection ( ) const
inline

◆ getSize()

size_t llvm::jitlink::Block::getSize ( ) const
inline

Returns the size of this defined addressable.

Definition at line 192 of file JITLink.h.

References Size.

Referenced by llvm::jitlink::operator<<().

◆ isZeroFill()

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

Returns true if this is a zero-fill block.

If true, getSize is callable but getContent is not (the content is defined to be a sequence of zero bytes of length Size).

Definition at line 189 of file JITLink.h.

References llvm::Data.

Referenced by llvm::jitlink::operator<<().

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setContent()

void llvm::jitlink::Block::setContent ( StringRef  Content)
inline

Set the content for this block.

Caller is responsible for ensuring the underlying bytes are not deallocated while pointed to by this block.

Definition at line 203 of file JITLink.h.

References llvm::Data, llvm::StringRef::data(), and llvm::StringRef::size().

Friends And Related Function Documentation

◆ LinkGraph

friend class LinkGraph
friend

Definition at line 138 of file JITLink.h.


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