|
LLVM
10.0.0
|
Symbol representation. More...
#include "llvm/ExecutionEngine/JITLink/JITLink.h"
Public Member Functions | |
| Symbol ()=default | |
| Create a null Symbol. More... | |
| 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. More... | |
| StringRef | getName () const |
| Returns the name of this symbol (empty if the symbol is anonymous). More... | |
| bool | isDefined () const |
| Returns true if this Symbol has content (potentially) defined within this object file (i.e. More... | |
| bool | isLive () const |
| Returns true if this symbol is live (i.e. More... | |
| void | setLive (bool IsLive) |
| Set this symbol's live bit. More... | |
| bool | isCallable () const |
| Returns true is this symbol is callable. More... | |
| void | setCallable (bool IsCallable) |
| Set this symbol's callable bit. More... | |
| bool | isExternal () const |
| Returns true if the underlying addressable is an unresolved external. More... | |
| bool | isAbsolute () const |
| Returns true if the underlying addressable is an absolute symbol. More... | |
| Addressable & | getAddressable () |
| Return the addressable that this symbol points to. More... | |
| const Addressable & | getAddressable () const |
| Return the addressable that thsi symbol points to. More... | |
| Block & | getBlock () |
| Return the Block for this Symbol (Symbol must be defined). More... | |
| const Block & | getBlock () const |
| Return the Block for this Symbol (Symbol must be defined). More... | |
| JITTargetAddress | getOffset () const |
| Returns the offset for this symbol within the underlying addressable. More... | |
| JITTargetAddress | getAddress () const |
| Returns the address of this symbol. More... | |
| JITTargetAddress | getSize () const |
| Returns the size of this symbol. More... | |
| bool | isSymbolZeroFill () const |
| Returns true if this symbol is backed by a zero-fill block. More... | |
| StringRef | getSymbolContent () const |
| Returns the content in the underlying block covered by this symbol. More... | |
| Linkage | getLinkage () const |
| Get the linkage for this Symbol. More... | |
| void | setLinkage (Linkage L) |
| Set the linkage for this Symbol. More... | |
| Scope | getScope () const |
| Get the visibility for this Symbol. More... | |
| void | setScope (Scope S) |
| Set the visibility for this Symbol. More... | |
Friends | |
| class | LinkGraph |
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:
|
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.
|
delete |
|
inline |
Returns the address of this symbol.
Definition at line 460 of file JITLink.h.
References llvm::jitlink::Addressable::getAddress().
Referenced by llvm::jitlink::SymbolAddressMap::addSymbol(), llvm::jitlink::MachOLinkGraphBuilder::findSymbolByAddress(), llvm::jitlink::MachOJITLinker_arm64::MachOJITLinker_arm64(), llvm::jitlink::MachOJITLinker_x86_64::MachOJITLinker_x86_64(), and llvm::jitlink::operator<<().
|
inline |
Return the addressable that this symbol points to.
Definition at line 431 of file JITLink.h.
References assert().
Referenced by llvm::jitlink::LinkGraph::makeExternal(), and llvm::jitlink::operator<<().
|
inline |
|
inline |
Return the Block for this Symbol (Symbol must be defined).
Definition at line 443 of file JITLink.h.
References assert(), and llvm::jitlink::Addressable::isDefined().
Referenced by llvm::jitlink::LinkGraph::makeExternal(), llvm::jitlink::operator<<(), and llvm::jitlink::LinkGraph::removeDefinedSymbol().
|
inline |
Get the linkage for this Symbol.
Definition at line 476 of file JITLink.h.
Referenced by llvm::jitlink::operator<<().
|
inline |
Returns the name of this symbol (empty if the symbol is anonymous).
Definition at line 389 of file JITLink.h.
References assert(), llvm::StringRef::empty(), llvm::jitlink::Local, and Name.
Referenced by llvm::jitlink::BasicGOTAndStubsBuilder< BuilderImpl >::getGOTEntrySymbol(), llvm::jitlink::BasicGOTAndStubsBuilder< BuilderImpl >::getStubSymbol(), and llvm::jitlink::operator<<().
|
inline |
Returns the offset for this symbol within the underlying addressable.
Definition at line 457 of file JITLink.h.
Referenced by llvm::jitlink::EHFrameSplitter::operator()(), llvm::jitlink::operator<<(), and llvm::jitlink::LinkGraph::splitBlock().
|
inline |
Get the visibility for this Symbol.
Definition at line 486 of file JITLink.h.
Referenced by llvm::jitlink::operator<<().
|
inline |
Returns the size of this symbol.
Definition at line 463 of file JITLink.h.
References Size.
Referenced by llvm::jitlink::operator<<().
|
inline |
Returns the content in the underlying block covered by this symbol.
This method may only be called on defined non-zero-fill symbols.
Definition at line 471 of file JITLink.h.
References llvm::StringRef::substr().
|
inline |
Returns true if this symbol has a name.
Definition at line 386 of file JITLink.h.
References llvm::StringRef::empty().
Referenced by llvm::jitlink::BasicGOTAndStubsBuilder< BuilderImpl >::getGOTEntrySymbol(), and llvm::jitlink::BasicGOTAndStubsBuilder< BuilderImpl >::getStubSymbol().
|
inline |
Returns true if the underlying addressable is an absolute symbol.
Definition at line 425 of file JITLink.h.
References assert(), llvm::jitlink::Addressable::isAbsolute(), and llvm::jitlink::Addressable::isDefined().
Referenced by llvm::jitlink::LinkGraph::removeAbsoluteSymbol(), and llvm::jitlink::LinkGraph::removeExternalSymbol().
|
inline |
|
inline |
Returns true if this Symbol has content (potentially) defined within this object file (i.e.
is anything but an external or absolute symbol).
Definition at line 397 of file JITLink.h.
References assert(), and llvm::jitlink::Addressable::isDefined().
Referenced by llvm::jitlink::LinkGraph::makeExternal(), llvm::jitlink::operator<<(), llvm::jitlink::LinkGraph::removeAbsoluteSymbol(), llvm::jitlink::LinkGraph::removeDefinedSymbol(), and llvm::jitlink::LinkGraph::removeExternalSymbol().
|
inline |
Returns true if the underlying addressable is an unresolved external.
Definition at line 419 of file JITLink.h.
References assert(), llvm::jitlink::Addressable::isAbsolute(), and llvm::jitlink::Addressable::isDefined().
|
inline |
Returns true if this symbol is live (i.e.
should be treated as a root for dead stripping).
Definition at line 404 of file JITLink.h.
References assert().
Referenced by llvm::jitlink::operator<<().
|
inline |
|
inline |
|
inline |
Set the linkage for this Symbol.
Definition at line 479 of file JITLink.h.
References assert(), llvm::StringRef::empty(), llvm::jitlink::Addressable::isAbsolute(), and llvm::jitlink::Strong.
|
inline |
|
inline |
Set the visibility for this Symbol.
Definition at line 489 of file JITLink.h.
References A, assert(), B, llvm::jitlink::Default, E, llvm::jitlink::Addressable::isAbsolute(), llvm::jitlink::Addressable::isDefined(), Name, llvm::jitlink::operator<<(), llvm::jitlink::printEdge(), and llvm::jitlink::Strong.
1.8.13