LLVM  8.0.0svn
Public Types | Public Member Functions | List of all members
llvm::JITSymbol Class Reference

Represents a symbol in the JIT. More...

#include "llvm/ExecutionEngine/JITSymbol.h"

Collaboration diagram for llvm::JITSymbol:
Collaboration graph
[legend]

Public Types

using GetAddressFtor = std::function< Expected< JITTargetAddress >()>
 

Public Member Functions

 JITSymbol (std::nullptr_t)
 Create a 'null' symbol, used to represent a "symbol not found" result from a successful (non-erroneous) lookup. More...
 
 JITSymbol (Error Err)
 Create a JITSymbol representing an error in the symbol lookup process (e.g. More...
 
 JITSymbol (JITTargetAddress Addr, JITSymbolFlags Flags)
 Create a symbol for a definition with a known address. More...
 
 JITSymbol (JITEvaluatedSymbol Sym)
 Construct a JITSymbol from a JITEvaluatedSymbol. More...
 
 JITSymbol (GetAddressFtor GetAddress, JITSymbolFlags Flags)
 Create a symbol for a definition that doesn't have a known address yet. More...
 
 JITSymbol (const JITSymbol &)=delete
 
JITSymboloperator= (const JITSymbol &)=delete
 
 JITSymbol (JITSymbol &&Other)
 
JITSymboloperator= (JITSymbol &&Other)
 
 ~JITSymbol ()
 
 operator bool () const
 Returns true if the symbol exists, false otherwise. More...
 
Error takeError ()
 Move the error field value out of this JITSymbol. More...
 
Expected< JITTargetAddressgetAddress ()
 Get the address of the symbol in the target address space. More...
 
JITSymbolFlags getFlags () const
 

Detailed Description

Represents a symbol in the JIT.

Definition at line 226 of file JITSymbol.h.

Member Typedef Documentation

◆ GetAddressFtor

Definition at line 228 of file JITSymbol.h.

Constructor & Destructor Documentation

◆ JITSymbol() [1/7]

llvm::JITSymbol::JITSymbol ( std::nullptr_t  )
inline

Create a 'null' symbol, used to represent a "symbol not found" result from a successful (non-erroneous) lookup.

Definition at line 232 of file JITSymbol.h.

◆ JITSymbol() [2/7]

llvm::JITSymbol::JITSymbol ( Error  Err)
inline

Create a JITSymbol representing an error in the symbol lookup process (e.g.

a network failure during a remote lookup).

Definition at line 237 of file JITSymbol.h.

◆ JITSymbol() [3/7]

llvm::JITSymbol::JITSymbol ( JITTargetAddress  Addr,
JITSymbolFlags  Flags 
)
inline

Create a symbol for a definition with a known address.

Definition at line 241 of file JITSymbol.h.

◆ JITSymbol() [4/7]

llvm::JITSymbol::JITSymbol ( JITEvaluatedSymbol  Sym)
inline

Construct a JITSymbol from a JITEvaluatedSymbol.

Definition at line 245 of file JITSymbol.h.

◆ JITSymbol() [5/7]

llvm::JITSymbol::JITSymbol ( GetAddressFtor  GetAddress,
JITSymbolFlags  Flags 
)
inline

Create a symbol for a definition that doesn't have a known address yet.

Parameters
GetAddressA functor to materialize a definition (fixing the address) on demand.

This constructor allows a JIT layer to provide a reference to a symbol definition without actually materializing the definition up front. The user can materialize the definition at any time by calling the getAddress method.

Definition at line 257 of file JITSymbol.h.

◆ JITSymbol() [6/7]

llvm::JITSymbol::JITSymbol ( const JITSymbol )
delete

◆ JITSymbol() [7/7]

llvm::JITSymbol::JITSymbol ( JITSymbol &&  Other)
inline

Definition at line 263 of file JITSymbol.h.

References Other.

◆ ~JITSymbol()

llvm::JITSymbol::~JITSymbol ( )
inline

Definition at line 281 of file JITSymbol.h.

Member Function Documentation

◆ getAddress()

Expected<JITTargetAddress> llvm::JITSymbol::getAddress ( )
inline

Get the address of the symbol in the target address space.

Returns '0' if the symbol does not exist.

Definition at line 302 of file JITSymbol.h.

References assert().

◆ getFlags()

JITSymbolFlags llvm::JITSymbol::getFlags ( ) const
inline

◆ operator bool()

llvm::JITSymbol::operator bool ( ) const
inlineexplicit

Returns true if the symbol exists, false otherwise.

Definition at line 289 of file JITSymbol.h.

◆ operator=() [1/2]

JITSymbol& llvm::JITSymbol::operator= ( const JITSymbol )
delete

◆ operator=() [2/2]

JITSymbol& llvm::JITSymbol::operator= ( JITSymbol &&  Other)
inline

Definition at line 271 of file JITSymbol.h.

References Other.

◆ takeError()

Error llvm::JITSymbol::takeError ( )
inline

Move the error field value out of this JITSymbol.

Definition at line 294 of file JITSymbol.h.

Member Data Documentation

◆ CachedAddr

JITTargetAddress llvm::JITSymbol::CachedAddr

Definition at line 320 of file JITSymbol.h.

◆ Err

Error llvm::JITSymbol::Err

Definition at line 321 of file JITSymbol.h.


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