LLVM
12.0.0git
|
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... | |
void | setName (StringRef Name) |
Rename this symbol. 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 467 of file JITLink.h.
References Offset.
Referenced by llvm::jitlink::SymbolAddressMap::addSymbol(), and llvm::jitlink::operator<<().
|
inline |
Return the addressable that this symbol points to.
Definition at line 438 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 450 of file JITLink.h.
References assert().
Referenced by getSymbolContent(), isSymbolZeroFill(), llvm::jitlink::LinkGraph::makeExternal(), llvm::jitlink::operator<<(), and llvm::jitlink::LinkGraph::removeDefinedSymbol().
|
inline |
Get the linkage for this Symbol.
Definition at line 483 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 392 of file JITLink.h.
References assert(), getScope(), and llvm::jitlink::Local.
Referenced by llvm::jitlink::operator<<().
|
inline |
Returns the offset for this symbol within the underlying addressable.
Definition at line 464 of file JITLink.h.
References Offset.
Referenced by llvm::jitlink::EHFrameSplitter::operator()(), llvm::jitlink::operator<<(), and llvm::jitlink::LinkGraph::splitBlock().
|
inline |
Get the visibility for this Symbol.
Definition at line 493 of file JITLink.h.
Referenced by getName(), and llvm::jitlink::operator<<().
|
inline |
Returns the size of this symbol.
Definition at line 470 of file JITLink.h.
References llvm::Check::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 478 of file JITLink.h.
References getBlock(), llvm::jitlink::Block::getContent(), Offset, llvm::Check::Size, and llvm::StringRef::substr().
|
inline |
|
inline |
Returns true if the underlying addressable is an absolute symbol.
Definition at line 432 of file JITLink.h.
References assert().
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 404 of file JITLink.h.
References assert().
Referenced by llvm::jitlink::LinkGraph::makeExternal(), llvm::jitlink::operator<<(), llvm::jitlink::LinkGraph::removeAbsoluteSymbol(), llvm::jitlink::LinkGraph::removeDefinedSymbol(), and llvm::jitlink::LinkGraph::removeExternalSymbol().
|
inline |
|
inline |
Returns true if this symbol is live (i.e.
should be treated as a root for dead stripping).
Definition at line 411 of file JITLink.h.
References assert().
Referenced by llvm::jitlink::operator<<().
|
inline |
Returns true if this symbol is backed by a zero-fill block.
This method may only be called on defined symbols.
Definition at line 474 of file JITLink.h.
References getBlock(), and llvm::jitlink::Block::isZeroFill().
|
inline |
|
inline |
Set the linkage for this Symbol.
Definition at line 486 of file JITLink.h.
References assert(), and llvm::jitlink::Strong.
|
inline |
|
inline |
|
inline |
Set the visibility for this Symbol.
Definition at line 496 of file JITLink.h.
References assert(), llvm::jitlink::Default, and llvm::jitlink::Local.