llvm::MCTargetExpr

Base class for target-specific assembler expressions.

Synopsis

Declared in <llvm/MC/MCExpr.h>

class MCTargetExpr
    : public MCExpr

Description

This can encode a relocation operator, serving as a replacement for MCSymbolRefExpr::VariantKind. Ideally, limit this to top-level use, avoiding its inclusion as a subexpression.

NOTE: All subclasses are required to have trivial destructors because MCExprs are bump pointer allocated and not destructed.

Base Classes

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

Enums

NameDescription
ExprKind Discriminator for concrete MCExpr subclasses.

Member Functions

NameDescription
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).
evaluateAsRelocatableImpl [virtual]Evaluate this target expression as a relocatable Res using Asm.
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 [virtual]Find the fragment associated with this target expression.
getKind Return the kind of this expression.
getLoc Return the source location of this expression.
inlineAssignedExpr [virtual]Return true if assigned expressions of this kind must be inlined.
isEqualTo [virtual]Return true if this target expression equals x.
printImpl [virtual]Print this target expression to OS.
visitUsedExpr [virtual]Visit symbols used by this target expression via Streamer.

Static Member Functions

NameDescription
classof Return true if E is a target-specific expression.
evaluateSymbolicAdd Add two symbolic relocatable values, folding resolved differences when possible.

Protected Type Aliases

NameDescription
Spec Relocation specifier type stored in subclass data.

Protected Member Functions

NameDescription
MCTargetExpr [constructor]Construct a target-specific expression.
~MCTargetExpr [destructor] [virtual]Destroy a target-specific expression.
evaluateAsRelocatableImpl Evaluate this expression as a relocatable value.
getSubclassData Return subclass-specific data stored in this expression.