LLVM  5.0.0
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:
[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
 
JITSymbol & operator= (const JITSymbol &)=delete
 
 JITSymbol (JITSymbol &&Other)
 
JITSymbol & operator= (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< JITTargetAddress > getAddress ()
 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 122 of file JITSymbol.h.

Member Typedef Documentation

Definition at line 124 of file JITSymbol.h.

Constructor & Destructor Documentation

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 128 of file JITSymbol.h.

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 133 of file JITSymbol.h.

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

Create a symbol for a definition with a known address.

Definition at line 137 of file JITSymbol.h.

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

Construct a JITSymbol from a JITEvaluatedSymbol.

Definition at line 141 of file JITSymbol.h.

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 153 of file JITSymbol.h.

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

Definition at line 159 of file JITSymbol.h.

References CachedAddr, Err, llvm::JITSymbolFlags::hasError(), and Other.

llvm::JITSymbol::~JITSymbol ( )
inline

Definition at line 177 of file JITSymbol.h.

References CachedAddr, Err, llvm::JITSymbolFlags::hasError(), and llvm::Error::~Error().

Member Function Documentation

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 198 of file JITSymbol.h.

References assert(), CachedAddr, and llvm::JITSymbolFlags::hasError().

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

Definition at line 211 of file JITSymbol.h.

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

Returns true if the symbol exists, false otherwise.

Definition at line 185 of file JITSymbol.h.

References CachedAddr, and llvm::JITSymbolFlags::hasError().

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

Definition at line 167 of file JITSymbol.h.

References CachedAddr, Err, llvm::JITSymbolFlags::hasError(), and Other.

Error llvm::JITSymbol::takeError ( )
inline

Move the error field value out of this JITSymbol.

Definition at line 190 of file JITSymbol.h.

References Err, llvm::JITSymbolFlags::hasError(), and llvm::Error::success().

Referenced by llvm::createResolver().

Member Data Documentation

JITTargetAddress llvm::JITSymbol::CachedAddr

Definition at line 216 of file JITSymbol.h.

Referenced by getAddress(), JITSymbol(), operator bool(), operator=(), and ~JITSymbol().

Error llvm::JITSymbol::Err

Definition at line 217 of file JITSymbol.h.

Referenced by JITSymbol(), operator=(), takeError(), and ~JITSymbol().


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