llvm::MCConstantExpr

/ Represent a constant integer expression.

Synopsis

Declared in <llvm/MC/MCExpr.h>

class MCConstantExpr
    : public MCExpr

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).
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 kind of this expression.
getLoc Return the source location of this expression.
getSizeInBytes Return the optional size-in-bytes printing hint, or 0 if none.
getValue Return the integer value of this constant expression.
useHexFormat Return true if this constant should be printed in hexadecimal.

Static Member Functions

NameDescription
classof Return true if E is a constant expression.
create Create a constant integer expression with value Value.
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
evaluateAsRelocatableImpl Evaluate this expression as a relocatable value.
getSubclassData Return subclass-specific data stored in this expression.