LLVM  10.0.0svn

Symbol representation. More...

#include "llvm/ExecutionEngine/JITLink/JITLink.h"

Public Member Functions

Symbol ()=default
Create a null Symbol. More...

Symbol (const Symbol &)=delete

Symboloperator= (const Symbol &)=delete

Symbol (Symbol &&)=delete

Symboloperator= (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...

Return the addressable that this symbol points to. More...

Return the addressable that thsi symbol points to. More...

BlockgetBlock ()
Return the Block for this Symbol (Symbol must be defined). More...

const BlockgetBlock () const
Return the Block for this Symbol (Symbol must be defined). More...

Returns the offset for this symbol within the underlying addressable. More...

Returns the address of this symbol. More...

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...

Get the linkage for this Symbol. More...

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...

Detailed Description

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 282 of file JITLink.h.

◆ Symbol() [1/3]

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

delete

Member Function Documentation

inline

Returns the address of this symbol.

Definition at line 441 of file JITLink.h.

inline

Return the addressable that this symbol points to.

Definition at line 412 of file JITLink.h.

References assert().

inline

Return the addressable that thsi symbol points to.

Definition at line 418 of file JITLink.h.

References assert().

◆ getBlock() [1/2]

inline

Return the Block for this Symbol (Symbol must be defined).

Definition at line 424 of file JITLink.h.

◆ getBlock() [2/2]

 const Block& llvm::jitlink::Symbol::getBlock ( ) const
inline

Return the Block for this Symbol (Symbol must be defined).

Definition at line 431 of file JITLink.h.

inline

Get the linkage for this Symbol.

Definition at line 457 of file JITLink.h.

◆ getName()

inline

Returns the name of this symbol (empty if the symbol is anonymous).

Definition at line 370 of file JITLink.h.

References assert(), llvm::StringRef::empty(), llvm::jitlink::Local, and Name.

◆ getOffset()

inline

Returns the offset for this symbol within the underlying addressable.

Definition at line 438 of file JITLink.h.

◆ getScope()

inline

Get the visibility for this Symbol.

Definition at line 467 of file JITLink.h.

◆ getSize()

inline

Returns the size of this symbol.

Definition at line 444 of file JITLink.h.

References Size.

◆ getSymbolContent()

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 452 of file JITLink.h.

References llvm::StringRef::substr().

◆ hasName()

inline

Returns true if this symbol has a name.

Definition at line 367 of file JITLink.h.

References llvm::StringRef::empty().

◆ isAbsolute()

inline

Returns true if the underlying addressable is an absolute symbol.

Definition at line 406 of file JITLink.h.

◆ isCallable()

inline

Returns true is this symbol is callable.

Definition at line 394 of file JITLink.h.

◆ isDefined()

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 378 of file JITLink.h.

◆ isExternal()

inline

Returns true if the underlying addressable is an unresolved external.

Definition at line 400 of file JITLink.h.

◆ isLive()

inline

Returns true if this symbol is live (i.e.

should be treated as a root for dead stripping).

Definition at line 385 of file JITLink.h.

References assert().

◆ isSymbolZeroFill()

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 448 of file JITLink.h.

◆ operator=() [1/2]

 Symbol& llvm::jitlink::Symbol::operator= ( const Symbol & )
delete

◆ 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 397 of file JITLink.h.

inline

Set the linkage for this Symbol.

Definition at line 460 of file JITLink.h.

◆ setLive()

 void llvm::jitlink::Symbol::setLive ( bool IsLive )
inline

Set this symbol's live bit.

Definition at line 391 of file JITLink.h.

◆ setScope()

 void llvm::jitlink::Symbol::setScope ( Scope S )
inline

Set the visibility for this Symbol.

Definition at line 470 of file JITLink.h.