LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::orc::ExecutorAddr Class Reference

Represents an address in the executor process. More...

#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"

Classes

class  Tag
 Merges a tag into the raw address value: P' = P | (TagValue << TagOffset). More...
 
class  Untag
 Strips a tag of the given length from the given offset within the pointer: P' = P & ~(((1 << TagLen) -1) << TagOffset) More...
 

Public Types

template<typename T >
using rawPtr = llvm::identity< T * >
 A wrap/unwrap function that leaves pointers unmodified.
 
template<typename T >
using defaultWrap = rawPtr< T >
 Default wrap function to use on this host.
 
template<typename T >
using defaultUnwrap = rawPtr< T >
 Default unwrap function to use on this host.
 

Public Member Functions

 ExecutorAddr ()=default
 
constexpr ExecutorAddr (uint64_t Addr)
 Create an ExecutorAddr from the given value.
 
template<typename T , typename WrapFn = defaultWrap<std::remove_pointer_t<T>>>
std::enable_if_t< std::is_pointer< T >::value, TtoPtr (WrapFn &&Wrap=WrapFn()) const
 Cast this ExecutorAddr to a pointer of the given type.
 
template<typename T , typename WrapFn = defaultWrap<T>>
std::enable_if_t< std::is_function< T >::value, T * > toPtr (WrapFn &&Wrap=WrapFn()) const
 Cast this ExecutorAddr to a pointer of the given function type.
 
uint64_t getValue () const
 
void setValue (uint64_t Addr)
 
bool isNull () const
 
 operator bool () const
 
ExecutorAddroperator++ ()
 
ExecutorAddroperator-- ()
 
ExecutorAddr operator++ (int)
 
ExecutorAddr operator-- (int)
 
ExecutorAddroperator+= (const ExecutorAddrDiff &Delta)
 
ExecutorAddroperator-= (const ExecutorAddrDiff &Delta)
 

Static Public Member Functions

template<typename T , typename UnwrapFn = defaultUnwrap<T>>
static ExecutorAddr fromPtr (T *Ptr, UnwrapFn &&Unwrap=UnwrapFn())
 Create an ExecutorAddr from the given pointer.
 

Friends

bool operator== (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator!= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator< (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator<= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator> (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator>= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 

Detailed Description

Represents an address in the executor process.

Definition at line 34 of file ExecutorAddress.h.

Member Typedef Documentation

◆ defaultUnwrap

template<typename T >
using llvm::orc::ExecutorAddr::defaultUnwrap = rawPtr<T>

Default unwrap function to use on this host.

Definition at line 69 of file ExecutorAddress.h.

◆ defaultWrap

template<typename T >
using llvm::orc::ExecutorAddr::defaultWrap = rawPtr<T>

Default wrap function to use on this host.

Definition at line 66 of file ExecutorAddress.h.

◆ rawPtr

template<typename T >
using llvm::orc::ExecutorAddr::rawPtr = llvm::identity<T *>

A wrap/unwrap function that leaves pointers unmodified.

Definition at line 37 of file ExecutorAddress.h.

Constructor & Destructor Documentation

◆ ExecutorAddr() [1/2]

llvm::orc::ExecutorAddr::ExecutorAddr ( )
default

Referenced by fromPtr(), operator++(), and operator--().

◆ ExecutorAddr() [2/2]

constexpr llvm::orc::ExecutorAddr::ExecutorAddr ( uint64_t  Addr)
inlineexplicitconstexpr

Create an ExecutorAddr from the given value.

Definition at line 106 of file ExecutorAddress.h.

References Addr.

Member Function Documentation

◆ fromPtr()

template<typename T , typename UnwrapFn = defaultUnwrap<T>>
static ExecutorAddr llvm::orc::ExecutorAddr::fromPtr ( T Ptr,
UnwrapFn &&  Unwrap = UnwrapFn() 
)
inlinestatic

◆ getValue()

uint64_t llvm::orc::ExecutorAddr::getValue ( ) const
inline

◆ isNull()

bool llvm::orc::ExecutorAddr::isNull ( ) const
inline

Definition at line 138 of file ExecutorAddress.h.

◆ operator bool()

llvm::orc::ExecutorAddr::operator bool ( ) const
inlineexplicit

Definition at line 140 of file ExecutorAddress.h.

◆ operator++() [1/2]

ExecutorAddr & llvm::orc::ExecutorAddr::operator++ ( )
inline

Definition at line 166 of file ExecutorAddress.h.

◆ operator++() [2/2]

ExecutorAddr llvm::orc::ExecutorAddr::operator++ ( int  )
inline

Definition at line 174 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator+=()

ExecutorAddr & llvm::orc::ExecutorAddr::operator+= ( const ExecutorAddrDiff Delta)
inline

Definition at line 177 of file ExecutorAddress.h.

◆ operator--() [1/2]

ExecutorAddr & llvm::orc::ExecutorAddr::operator-- ( )
inline

Definition at line 170 of file ExecutorAddress.h.

◆ operator--() [2/2]

ExecutorAddr llvm::orc::ExecutorAddr::operator-- ( int  )
inline

Definition at line 175 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator-=()

ExecutorAddr & llvm::orc::ExecutorAddr::operator-= ( const ExecutorAddrDiff Delta)
inline

Definition at line 182 of file ExecutorAddress.h.

◆ setValue()

void llvm::orc::ExecutorAddr::setValue ( uint64_t  Addr)
inline

Definition at line 137 of file ExecutorAddress.h.

References Addr.

◆ toPtr() [1/2]

template<typename T , typename WrapFn = defaultWrap<std::remove_pointer_t<T>>>
std::enable_if_t< std::is_pointer< T >::value, T > llvm::orc::ExecutorAddr::toPtr ( WrapFn &&  Wrap = WrapFn()) const
inline

◆ toPtr() [2/2]

template<typename T , typename WrapFn = defaultWrap<T>>
std::enable_if_t< std::is_function< T >::value, T * > llvm::orc::ExecutorAddr::toPtr ( WrapFn &&  Wrap = WrapFn()) const
inline

Cast this ExecutorAddr to a pointer of the given function type.

Warning: This should only be used when JITing in-process.

Definition at line 130 of file ExecutorAddress.h.

References assert().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 146 of file ExecutorAddress.h.

◆ operator<

bool operator< ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 150 of file ExecutorAddress.h.

◆ operator<=

bool operator<= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 154 of file ExecutorAddress.h.

◆ operator==

bool operator== ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 142 of file ExecutorAddress.h.

◆ operator>

bool operator> ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 158 of file ExecutorAddress.h.

◆ operator>=

bool operator>= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 162 of file ExecutorAddress.h.


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