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

Represents a symbol in the JIT. More...

#include <JITSymbol.h>

Public Types

typedef std::function
< JITTargetAddress()> 
GetAddressFtor
 

Public Member Functions

 JITSymbol (std::nullptr_t)
 Create a 'null' symbol that represents failure to find a symbol definition. 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...
 
 operator bool () const
 Returns true if the symbol exists, false otherwise. More...
 
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 113 of file JITSymbol.h.

Member Typedef Documentation

Definition at line 115 of file JITSymbol.h.

Constructor & Destructor Documentation

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

Create a 'null' symbol that represents failure to find a symbol definition.

Definition at line 119 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 123 of file JITSymbol.h.

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

Construct a JITSymbol from a JITEvaluatedSymbol.

Definition at line 127 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 139 of file JITSymbol.h.

Member Function Documentation

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

References assert().

Referenced by llvm::orc::OrcMCJITReplacement::getSymbolAddress(), llvm::MCJIT::getSymbolAddress(), and LLVMOrcGetSymbolAddress().

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

Definition at line 156 of file JITSymbol.h.

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

Returns true if the symbol exists, false otherwise.

Definition at line 143 of file JITSymbol.h.


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