Represent a reference to a symbol from inside an expression.

Synopsis

Declared in <llvm/MC/MCExpr.h>

class MCSymbolRefExpr
    : public MCExpr

Description

A symbol reference in an expression may be a use of a label, a use of an assembler variable (defined constant), or constitute an implicit definition of the symbol as external.

Base Classes

Name

Description

MCExpr

Base class for the full range of assembler expressions which are needed for parsing.

Enums

Name

Description

ExprKind

Discriminator for concrete MCExpr subclasses.

VariantKind

Relocation or assembler variant applied to a symbol reference.

Member Functions

Name

Description

operator= [deleted]

Deleted copy assignment.

dump

Dump this expression to stderr.

evaluateAsAbsolute

evaluateAsAbsolute overloads

evaluateAsRelocatable

Try to evaluate the expression to a relocatable value, i.e. an expression of the fixed form (a ‐ b + constant).

evaluateAsValue

Try to evaluate the expression to the form (a ‐ b + constant) where neither a nor b are variables.

evaluateKnownAbsolute

Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g. .fill). Expects callers to handle errors when true is returned.

findAssociatedFragment

Find the fragment associated with this expression.

getKind

Return the relocation variant kind encoded in this symbol reference.

getLoc

Return the source location of this expression.

getSpecifier

Return the relocation specifier encoded in this symbol reference.

getSymbol

Return the referenced symbol.

Static Member Functions

Name

Description

classof

Return true if E is a symbol reference expression.

create

create overloads

evaluateSymbolicAdd

Add two symbolic relocatable values, folding resolved differences when possible.

Protected Type Aliases

Name

Description

Spec

Relocation specifier type stored in subclass data.

Protected Member Functions

Name

Description

evaluateAsRelocatableImpl

Evaluate this expression as a relocatable value.

getSubclassData

Return subclass‐specific data stored in this expression.

Created with MrDocs