LLVM
8.0.1
|
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... | |
JITSymbolFlags & | operator &= (const FlagNames &RHS) |
Bitwise AND-assignment for FlagNames. More... | |
JITSymbolFlags & | operator|= (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... | |
TargetFlagsType & | getTargetFlags () |
Return a reference to the target-specific flags. More... | |
const TargetFlagsType & | getTargetFlags () 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< JITSymbolFlags > | fromObjectSymbol (const object::SymbolRef &Symbol) |
Construct a JITSymbolFlags value based on the flags of the given libobject symbol. More... | |
Flags for symbols in the JIT.
Definition at line 56 of file JITSymbol.h.
using llvm::JITSymbolFlags::TargetFlagsType = uint64_t |
Definition at line 59 of file JITSymbol.h.
using llvm::JITSymbolFlags::UnderlyingType = uint8_t |
Definition at line 58 of file JITSymbol.h.
Enumerator | |
---|---|
None | |
HasError | |
Weak | |
Common | |
Absolute | |
Exported | |
Callable | |
Lazy | |
Materializing |
Definition at line 61 of file JITSymbol.h.
|
default |
Default-construct a JITSymbolFlags instance.
|
inline |
Construct a JITSymbolFlags instance from the given flags.
Definition at line 82 of file JITSymbol.h.
|
inline |
Construct a JITSymbolFlags instance from the given flags and target flags.
Definition at line 86 of file JITSymbol.h.
|
static |
Construct a JITSymbolFlags value based on the flags of the given global value.
Definition at line 22 of file JITSymbol.cpp.
References Callable, Common, Exported, llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasHiddenVisibility(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasWeakLinkage(), None, and Weak.
Referenced by llvm::orc::CompileOnDemandLayer::emit(), and llvm::orc::IRMaterializationUnit::IRMaterializationUnit().
|
static |
Construct a JITSymbolFlags value based on the flags of the given libobject symbol.
Definition at line 41 of file JITSymbol.cpp.
References Callable, Common, Exported, llvm::object::BasicSymbolRef::getFlags(), llvm::object::SymbolRef::getType(), None, llvm::object::BasicSymbolRef::SF_Common, llvm::object::BasicSymbolRef::SF_Exported, llvm::object::BasicSymbolRef::SF_Weak, llvm::object::SymbolRef::ST_Function, and Weak.
Referenced by llvm::RuntimeDyldImpl::getJITSymbolFlags(), and llvm::orc::getObjectSymbolFlags().
|
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().
|
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().
|
inline |
Return a reference to the target-specific flags.
Definition at line 159 of file JITSymbol.h.
References llvm::None, and llvm::ARMBuildAttrs::Symbol.
|
inline |
Return true if there was an error retrieving this symbol.
Definition at line 110 of file JITSymbol.h.
|
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<<().
|
inline |
Returns true if the Common flag is set.
Definition at line 133 of file JITSymbol.h.
Referenced by llvm::orc::operator<<().
|
inline |
Returns true if the Exported flag is set.
Definition at line 143 of file JITSymbol.h.
Referenced by llvm::orc::operator<<().
|
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.
|
inline |
Returns true if this symbol is fully materialized.
(i.e. neither lazy, nor materializing).
Definition at line 125 of file JITSymbol.h.
|
inline |
Returns true if this symbol is in the process of being materialized.
Definition at line 121 of file JITSymbol.h.
|
inline |
Returns true if the symbol isn't weak or common.
Definition at line 138 of file JITSymbol.h.
References isWeak().
|
inline |
Returns true if the Weak flag is set.
Definition at line 128 of file JITSymbol.h.
Referenced by llvm::orc::operator<<().
|
inline |
Bitwise AND-assignment for FlagNames.
Definition at line 98 of file JITSymbol.h.
|
inlineexplicit |
Implicitly convert to bool. Returs true if any flag is set.
Definition at line 90 of file JITSymbol.h.
References llvm::None.
|
inline |
Compare for equality.
Definition at line 93 of file JITSymbol.h.
|
inline |
Bitwise OR-assignment for FlagNames.
Definition at line 104 of file JITSymbol.h.
|
inlinestatic |
Definition at line 74 of file JITSymbol.h.
Referenced by llvm::orc::JITDylib::lookupFlags(), and llvm::orc::ReexportsGenerator::operator()().