LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::JITSymbolFlags Class Reference

Flags for symbols in the JIT. More...

#include "llvm/ExecutionEngine/JITSymbol.h"

Public Types

enum  FlagNames : UnderlyingType {
  None = 0, HasError = 1U << 0, Weak = 1U << 1, Common = 1U << 2,
  Absolute = 1U << 3, Exported = 1U << 4, Callable = 1U << 5, Lazy = 1U << 6,
  Materializing = 1U << 7
}
 
using UnderlyingType = uint8_t
 
using TargetFlagsType = uint64_t
 

Public Member Functions

 JITSymbolFlags ()=default
 Default-construct a JITSymbolFlags instance. More...
 
 JITSymbolFlags (FlagNames Flags)
 Construct a JITSymbolFlags instance from the given flags. More...
 
 JITSymbolFlags (FlagNames Flags, TargetFlagsType TargetFlags)
 Construct a JITSymbolFlags instance from the given flags and target flags. More...
 
 operator bool () const
 Implicitly convert to bool. Returs true if any flag is set. More...
 
bool operator== (const JITSymbolFlags &RHS) const
 Compare for equality. More...
 
JITSymbolFlagsoperator &= (const FlagNames &RHS)
 Bitwise AND-assignment for FlagNames. More...
 
JITSymbolFlagsoperator|= (const FlagNames &RHS)
 Bitwise OR-assignment for FlagNames. More...
 
bool hasError () const
 Return true if there was an error retrieving this symbol. More...
 
bool isLazy () const
 Returns true if this is a lazy symbol. More...
 
bool isMaterializing () const
 Returns true if this symbol is in the process of being materialized. More...
 
bool isMaterialized () const
 Returns true if this symbol is fully materialized. More...
 
bool isWeak () const
 Returns true if the Weak flag is set. More...
 
bool isCommon () const
 Returns true if the Common flag is set. More...
 
bool isStrong () const
 Returns true if the symbol isn't weak or common. More...
 
bool isExported () const
 Returns true if the Exported flag is set. More...
 
bool isCallable () const
 Returns true if the given symbol is known to be callable. More...
 
UnderlyingType getRawFlagsValue () const
 Get the underlying flags value as an integer. More...
 
TargetFlagsTypegetTargetFlags ()
 Return a reference to the target-specific flags. More...
 
const TargetFlagsTypegetTargetFlags () const
 Return a reference to the target-specific flags. More...
 

Static Public Member Functions

static JITSymbolFlags stripTransientFlags (JITSymbolFlags Orig)
 
static JITSymbolFlags fromGlobalValue (const GlobalValue &GV)
 Construct a JITSymbolFlags value based on the flags of the given global value. More...
 
static Expected< JITSymbolFlagsfromObjectSymbol (const object::SymbolRef &Symbol)
 Construct a JITSymbolFlags value based on the flags of the given libobject symbol. More...
 

Detailed Description

Flags for symbols in the JIT.

Definition at line 56 of file JITSymbol.h.

Member Typedef Documentation

◆ TargetFlagsType

Definition at line 59 of file JITSymbol.h.

◆ UnderlyingType

Definition at line 58 of file JITSymbol.h.

Member Enumeration Documentation

◆ FlagNames

Enumerator
None 
HasError 
Weak 
Common 
Absolute 
Exported 
Callable 
Lazy 
Materializing 

Definition at line 61 of file JITSymbol.h.

Constructor & Destructor Documentation

◆ JITSymbolFlags() [1/3]

llvm::JITSymbolFlags::JITSymbolFlags ( )
default

Default-construct a JITSymbolFlags instance.

◆ JITSymbolFlags() [2/3]

llvm::JITSymbolFlags::JITSymbolFlags ( FlagNames  Flags)
inline

Construct a JITSymbolFlags instance from the given flags.

Definition at line 82 of file JITSymbol.h.

◆ JITSymbolFlags() [3/3]

llvm::JITSymbolFlags::JITSymbolFlags ( FlagNames  Flags,
TargetFlagsType  TargetFlags 
)
inline

Construct a JITSymbolFlags instance from the given flags and target flags.

Definition at line 86 of file JITSymbol.h.

Member Function Documentation

◆ fromGlobalValue()

JITSymbolFlags llvm::JITSymbolFlags::fromGlobalValue ( const GlobalValue GV)
static

◆ fromObjectSymbol()

Expected< JITSymbolFlags > llvm::JITSymbolFlags::fromObjectSymbol ( const object::SymbolRef Symbol)
static

◆ getRawFlagsValue()

UnderlyingType llvm::JITSymbolFlags::getRawFlagsValue ( ) const
inline

Get the underlying flags value as an integer.

Definition at line 151 of file JITSymbol.h.

Referenced by llvm::orc::rpc::SerializationTraits< ChannelT, JITSymbolFlags >::serialize().

◆ getTargetFlags() [1/2]

TargetFlagsType& llvm::JITSymbolFlags::getTargetFlags ( )
inline

Return a reference to the target-specific flags.

Definition at line 156 of file JITSymbol.h.

Referenced by llvm::RuntimeDyldMachOARM::modifyAddressBasedOnFlags(), and llvm::orc::rpc::SerializationTraits< ChannelT, JITSymbolFlags >::serialize().

◆ getTargetFlags() [2/2]

const TargetFlagsType& llvm::JITSymbolFlags::getTargetFlags ( ) const
inline

Return a reference to the target-specific flags.

Definition at line 159 of file JITSymbol.h.

References llvm::None, and llvm::ARMBuildAttrs::Symbol.

◆ hasError()

bool llvm::JITSymbolFlags::hasError ( ) const
inline

Return true if there was an error retrieving this symbol.

Definition at line 110 of file JITSymbol.h.

◆ isCallable()

bool llvm::JITSymbolFlags::isCallable ( ) const
inline

Returns true if the given symbol is known to be callable.

Definition at line 148 of file JITSymbol.h.

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

◆ isCommon()

bool llvm::JITSymbolFlags::isCommon ( ) const
inline

Returns true if the Common flag is set.

Definition at line 133 of file JITSymbol.h.

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

◆ isExported()

bool llvm::JITSymbolFlags::isExported ( ) const
inline

Returns true if the Exported flag is set.

Definition at line 143 of file JITSymbol.h.

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

◆ isLazy()

bool llvm::JITSymbolFlags::isLazy ( ) const
inline

Returns true if this is a lazy symbol.

This flag is used internally by the JIT APIs to track materialization states.

Definition at line 117 of file JITSymbol.h.

◆ isMaterialized()

bool llvm::JITSymbolFlags::isMaterialized ( ) const
inline

Returns true if this symbol is fully materialized.

(i.e. neither lazy, nor materializing).

Definition at line 125 of file JITSymbol.h.

◆ isMaterializing()

bool llvm::JITSymbolFlags::isMaterializing ( ) const
inline

Returns true if this symbol is in the process of being materialized.

Definition at line 121 of file JITSymbol.h.

◆ isStrong()

bool llvm::JITSymbolFlags::isStrong ( ) const
inline

Returns true if the symbol isn't weak or common.

Definition at line 138 of file JITSymbol.h.

References isWeak().

◆ isWeak()

bool llvm::JITSymbolFlags::isWeak ( ) const
inline

Returns true if the Weak flag is set.

Definition at line 128 of file JITSymbol.h.

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

◆ operator &=()

JITSymbolFlags& llvm::JITSymbolFlags::operator&= ( const FlagNames RHS)
inline

Bitwise AND-assignment for FlagNames.

Definition at line 98 of file JITSymbol.h.

◆ operator bool()

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

Implicitly convert to bool. Returs true if any flag is set.

Definition at line 90 of file JITSymbol.h.

References llvm::None.

◆ operator==()

bool llvm::JITSymbolFlags::operator== ( const JITSymbolFlags RHS) const
inline

Compare for equality.

Definition at line 93 of file JITSymbol.h.

◆ operator|=()

JITSymbolFlags& llvm::JITSymbolFlags::operator|= ( const FlagNames RHS)
inline

Bitwise OR-assignment for FlagNames.

Definition at line 104 of file JITSymbol.h.

◆ stripTransientFlags()

static JITSymbolFlags llvm::JITSymbolFlags::stripTransientFlags ( JITSymbolFlags  Orig)
inlinestatic

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