LLVM: llvm::jitlink::Symbol Class Reference (original) (raw)
Symbol representation. More...
#include "[llvm/ExecutionEngine/JITLink/JITLink.h](JITLink%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| Symbol ()=default | |
| Create a null Symbol. | |
| Symbol (const Symbol &)=delete | |
| Symbol & | operator= (const Symbol &)=delete |
| Symbol (Symbol &&)=delete | |
| Symbol & | operator= (Symbol &&)=delete |
| bool | hasName () const |
| Returns true if this symbol has a name. | |
| const orc::SymbolStringPtr & | getName () const |
| Returns the name of this symbol (empty if the symbol is anonymous). | |
| void | setName (const orc::SymbolStringPtr Name) |
| Rename this symbol. | |
| bool | isDefined () const |
| Returns true if this Symbol has content (potentially) defined within this object file (i.e. | |
| bool | isLive () const |
| Returns true if this symbol is live (i.e. | |
| void | setLive (bool IsLive) |
| Set this symbol's live bit. | |
| bool | isCallable () const |
| Returns true is this symbol is callable. | |
| void | setCallable (bool IsCallable) |
| Set this symbol's callable bit. | |
| bool | isExternal () const |
| Returns true if the underlying addressable is an unresolved external. | |
| bool | isAbsolute () const |
| Returns true if the underlying addressable is an absolute symbol. | |
| Addressable & | getAddressable () |
| Return the addressable that this symbol points to. | |
| const Addressable & | getAddressable () const |
| Return the addressable that this symbol points to. | |
| Block & | getBlock () |
| Return the Block for this Symbol (Symbol must be defined). | |
| const Block & | getBlock () const |
| Return the Block for this Symbol (Symbol must be defined). | |
| Section & | getSection () const |
| Return the Section for this Symbol (Symbol must be defined). | |
| orc::ExecutorAddrDiff | getOffset () const |
| Returns the offset for this symbol within the underlying addressable. | |
| void | setOffset (orc::ExecutorAddrDiff NewOffset) |
| orc::ExecutorAddr | getAddress () const |
| Returns the address of this symbol. | |
| orc::ExecutorAddrDiff | getSize () const |
| Returns the size of this symbol. | |
| void | setSize (orc::ExecutorAddrDiff Size) |
| Set the size of this symbol. | |
| orc::ExecutorAddrRange | getRange () const |
| Returns the address range of this symbol. | |
| bool | isSymbolZeroFill () const |
| Returns true if this symbol is backed by a zero-fill block. | |
| ArrayRef< char > | getSymbolContent () const |
| Returns the content in the underlying block covered by this symbol. | |
| Linkage | getLinkage () const |
| Get the linkage for this Symbol. | |
| void | setLinkage (Linkage L) |
| Set the linkage for this Symbol. | |
| Scope | getScope () const |
| Get the visibility for this Symbol. | |
| void | setScope (Scope S) |
| Set the visibility for this Symbol. | |
| TargetFlagsType | getTargetFlags () const |
| Get the target flags of this Symbol. | |
| void | setTargetFlags (TargetFlagsType Flags) |
| Set the target flags for this Symbol. | |
| bool | isWeaklyReferenced () const |
| Returns true if this is a weakly referenced external symbol. | |
| void | setWeaklyReferenced (bool WeakRef) |
| Set the WeaklyReferenced value for this symbol. |
Symbol representation.
Symbols represent locations within Addressable objects. They can be either Named or Anonymous. Anonymous symbols have neither linkage nor visibility, and must point at ContentBlocks. Named symbols may be in one of four states:
- Null: Default initialized. Assignable, but otherwise unusable.
- Defined: Has both linkage and visibility and points to a ContentBlock
- Common: Has both linkage and visibility, points to a null Addressable.
- External: Has neither linkage nor visibility, points to an external Addressable.
Definition at line 433 of file JITLink.h.
◆ Symbol() [1/3]
| llvm::jitlink::Symbol::Symbol ( ) | default |
|---|
Create a null Symbol.
This allows Symbols to be default initialized for use in containers (e.g. as map values). Null symbols are only useful for assigning to.
◆ Symbol() [2/3]
| llvm::jitlink::Symbol::Symbol ( const Symbol & ) | delete |
|---|
◆ Symbol() [3/3]
| llvm::jitlink::Symbol::Symbol ( Symbol && ) | delete |
|---|
◆ getAddress()
Returns the address of this symbol.
Definition at line 603 of file JITLink.h.
Referenced by llvm::orc::addFunctionPointerRelocationsToCurrentSymbol(), llvm::jitlink::SymbolAddressMap::addSymbol(), llvm::jitlink::aarch64::applyFixup(), llvm::jitlink::ppc64::applyFixup(), llvm::jitlink::systemz::applyFixup(), llvm::jitlink::x86::applyFixup(), llvm::jitlink::x86_64::applyFixup(), llvm::jitlink::aarch32::applyFixupArm(), llvm::jitlink::aarch32::applyFixupData(), llvm::jitlink::aarch32::applyFixupThumb(), getRange(), and llvm::jitlink::operator<<().
◆ getAddressable() [1/2]
| Addressable & llvm::jitlink::Symbol::getAddressable ( ) | inline |
|---|
◆ getAddressable() [2/2]
Return the addressable that this symbol points to.
Definition at line 572 of file JITLink.h.
References assert().
◆ getBlock() [1/2]
| Block & llvm::jitlink::Symbol::getBlock ( ) | inline |
|---|
◆ getBlock() [2/2]
| const Block & llvm::jitlink::Symbol::getBlock ( ) const | inline |
|---|
◆ getLinkage()
| Linkage llvm::jitlink::Symbol::getLinkage ( ) const | inline |
|---|
◆ getName()
Returns the name of this symbol (empty if the symbol is anonymous).
Definition at line 519 of file JITLink.h.
References assert(), getScope(), hasName(), and llvm::jitlink::Local.
Referenced by llvm::jitlink::LinkGraph::addAbsoluteSymbol(), llvm::jitlink::LinkGraph::addDefinedSymbol(), llvm::orc::addFunctionPointerRelocationsToCurrentSymbol(), llvm::jitlink::identifyELFSectionStartAndEndSymbols(), llvm::jitlink::identifyMachOSectionStartAndEndSymbols(), llvm::jitlink::LinkGraph::makeAbsolute(), llvm::jitlink::LinkGraph::makeDefined(), llvm::jitlink::LinkGraph::makeExternal(), llvm::jitlink::makeTargetOutOfRangeError(), llvm::jitlink::operator<<(), llvm::jitlink::CompactUnwindManager< CURecTraits >::prepareForPrune(), and llvm::jitlink::LinkGraph::removeExternalSymbol().
◆ getOffset()
◆ getRange()
◆ getScope()
| Scope llvm::jitlink::Symbol::getScope ( ) const | inline |
|---|
◆ getSection()
| Section & llvm::jitlink::Symbol::getSection ( ) const | inline |
|---|
◆ getSize()
◆ getSymbolContent()
| ArrayRef< char > llvm::jitlink::Symbol::getSymbolContent ( ) const | inline |
|---|
◆ getTargetFlags()
◆ hasName()
| bool llvm::jitlink::Symbol::hasName ( ) const | inline |
|---|
◆ isAbsolute()
| bool llvm::jitlink::Symbol::isAbsolute ( ) const | inline |
|---|
◆ isCallable()
| bool llvm::jitlink::Symbol::isCallable ( ) const | inline |
|---|
◆ isDefined()
| bool llvm::jitlink::Symbol::isDefined ( ) const | inline |
|---|
◆ isExternal()
| bool llvm::jitlink::Symbol::isExternal ( ) const | inline |
|---|
◆ isLive()
| bool llvm::jitlink::Symbol::isLive ( ) const | inline |
|---|
◆ isSymbolZeroFill()
| bool llvm::jitlink::Symbol::isSymbolZeroFill ( ) const | inline |
|---|
◆ isWeaklyReferenced()
| bool llvm::jitlink::Symbol::isWeaklyReferenced ( ) const | inline |
|---|
Returns true if this is a weakly referenced external symbol.
This method may only be called on external symbols.
Definition at line 666 of file JITLink.h.
References assert(), and isExternal().
◆ operator=() [1/2]
◆ operator=() [2/2]
| Symbol & llvm::jitlink::Symbol::operator= ( Symbol && ) | delete |
|---|
◆ setCallable()
| void llvm::jitlink::Symbol::setCallable ( bool IsCallable) | inline |
|---|
Set this symbol's callable bit.
Definition at line 551 of file JITLink.h.
◆ setLinkage()
| void llvm::jitlink::Symbol::setLinkage ( Linkage L) | inline |
|---|
◆ setLive()
| void llvm::jitlink::Symbol::setLive ( bool IsLive) | inline |
|---|
◆ setName()
Rename this symbol.
The client is responsible for updating scope and linkage if this name-change requires it.
Definition at line 528 of file JITLink.h.
◆ setOffset()
◆ setScope()
| void llvm::jitlink::Symbol::setScope ( Scope S) | inline |
|---|
◆ setSize()
◆ setTargetFlags()
◆ setWeaklyReferenced()
| void llvm::jitlink::Symbol::setWeaklyReferenced ( bool WeakRef) | inline |
|---|
Set the WeaklyReferenced value for this symbol.
This method may only be called on external symbols.
Definition at line 673 of file JITLink.h.
References assert(), and isExternal().
◆ LinkGraph
The documentation for this class was generated from the following file:
- include/llvm/ExecutionEngine/JITLink/JITLink.h