LLVM: llvm::MCSpecifierExpr Class Reference (original) (raw)

Extension point for target-specific MCExpr subclasses with a relocation specifier, serving as a replacement for MCSymbolRefExpr::VariantKind. More...

#include "[llvm/MC/MCExpr.h](MCExpr%5F8h%5Fsource.html)"

Inheritance diagram for llvm::MCSpecifierExpr:

Public Member Functions
Spec getSpecifier () const
const MCExpr * getSubExpr () const
Public Member Functions inherited from llvm::MCExpr
MCExpr (const MCExpr &)=delete
MCExpr & operator= (const MCExpr &)=delete
ExprKind getKind () const
SMLoc getLoc () const
LLVM_ABI void dump () const
LLVM_ABI bool evaluateAsAbsolute (int64_t &Res) const
Try to evaluate the expression to an absolute value.
LLVM_ABI bool evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const
LLVM_ABI bool evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const
LLVM_ABI bool evaluateKnownAbsolute (int64_t &Res, const MCAssembler &Asm) const
Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g.
LLVM_ABI bool evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm) const
Try to evaluate the expression to a relocatable value, i.e.
LLVM_ABI bool evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const
Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables.
LLVM_ABI MCFragment * findAssociatedFragment () const
Find the "associated section" for this expression, which is currently defined as the absolute section for constants, or otherwise the section associated with the first defined symbol in the expression.
Static Public Member Functions
static const MCSpecifierExpr * create (const MCExpr *Expr, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())
static const MCSpecifierExpr * create (const MCSymbol *Sym, Spec S, MCContext &Ctx, SMLoc Loc=SMLoc())
static bool classof (const MCExpr *E)
Static Public Member Functions inherited from llvm::MCExpr
static LLVM_ABI bool evaluateSymbolicAdd (const MCAssembler *, bool, const MCValue &, const MCValue &, MCValue &)
Protected Member Functions
MCSpecifierExpr (const MCExpr *Expr, Spec S, SMLoc Loc=SMLoc())
Protected Member Functions inherited from llvm::MCExpr
MCExpr (ExprKind Kind, SMLoc Loc, unsigned SubclassData=0)
LLVM_ABI bool evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, bool InSet) const
unsigned getSubclassData () const

Detailed Description

Extension point for target-specific MCExpr subclasses with a relocation specifier, serving as a replacement for MCSymbolRefExpr::VariantKind.

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.

Definition at line 495 of file MCExpr.h.

Constructor & Destructor Documentation

Member Function Documentation

classof()

create() [1/2]

Definition at line 743 of file MCExpr.cpp.

References Expr, llvm::MCExpr::MCExpr(), and MCSpecifierExpr().

Referenced by llvm::CSKYConstantPool::addEntry(), createGOTRelExprOp(), llvm::Mips::createGpOff(), llvm::ARM::createLower0_7(), llvm::ARM::createLower16(), llvm::ARM::createLower8_15(), createPCXRelExprOp(), createSparcMCOperand(), llvm::ARM::createUpper0_7(), llvm::ARM::createUpper16(), llvm::ARM::createUpper8_15(), createVEMCOperand(), emitAddress(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::RISCVMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::RISCVELFTargetObjectFile::getIndirectSymViaGOTPCRel(), GetSymbolRef(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::lowerSymbolDifference(), llvm::LanaiMCInstLower::LowerSymbolOperand(), LowerSymbolOperand(), llvm::CSKYMCInstLower::lowerSymbolOperand(), lowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), and llvm::AArch64MCInstLower::lowerSymbolOperandELF().

create() [2/2]

getSpecifier()

Spec llvm::MCSpecifierExpr::getSpecifier ( ) const inline

Definition at line 508 of file MCExpr.h.

References llvm::MCExpr::getSubclassData().

Referenced by evaluate(), evaluate(), llvm::PPC::evaluateAsConstant(), evaluateAsRelocatable(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), llvm::AVRMCExpr::getFixupKind(), llvm::AVRMCExpr::getName(), llvm::AArch64AuthMCExpr::hasAddressDiversity(), printImpl(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::ARM::printSpecifierExpr(), llvm::CSKYMCAsmInfo::printSpecifierExpr(), llvm::LanaiMCAsmInfo::printSpecifierExpr(), llvm::LoongArchMCAsmInfo::printSpecifierExpr(), llvm::PPCELFMCAsmInfo::printSpecifierExpr(), llvm::PPCXCOFFMCAsmInfo::printSpecifierExpr(), llvm::RISCVMCAsmInfo::printSpecifierExpr(), llvm::SparcELFMCAsmInfo::printSpecifierExpr(), llvm::SystemZMCAsmInfoGOFF::printSpecifierExpr(), llvm::VEELFMCAsmInfo::printSpecifierExpr(), and llvm::XtensaMCAsmInfo::printSpecifierExpr().

getSubExpr()

const MCExpr * llvm::MCSpecifierExpr::getSubExpr ( ) const inline

Definition at line 509 of file MCExpr.h.

References Expr, and llvm::MCExpr::MCExpr().

Referenced by evaluate(), evaluate(), llvm::AVRMCExpr::evaluateAsConstant(), llvm::PPC::evaluateAsConstant(), evaluateAsRelocatable(), llvm::SystemZMCAsmInfoGOFF::evaluateAsRelocatableImpl(), llvm::VEELFMCAsmInfo::evaluateAsRelocatableImpl(), getPCRelHiFixup(), llvm::AArch64AuthMCExpr::print(), printImpl(), llvm::AArch64MCAsmInfoDarwin::printSpecifierExpr(), llvm::AArch64MCAsmInfoELF::printSpecifierExpr(), llvm::AArch64MCAsmInfoGNUCOFF::printSpecifierExpr(), llvm::AArch64MCAsmInfoMicrosoftCOFF::printSpecifierExpr(), llvm::ARM::printSpecifierExpr(), llvm::CSKYMCAsmInfo::printSpecifierExpr(), llvm::LanaiMCAsmInfo::printSpecifierExpr(), llvm::LoongArchMCAsmInfo::printSpecifierExpr(), llvm::PPCELFMCAsmInfo::printSpecifierExpr(), llvm::PPCXCOFFMCAsmInfo::printSpecifierExpr(), llvm::RISCVMCAsmInfo::printSpecifierExpr(), llvm::SparcELFMCAsmInfo::printSpecifierExpr(), llvm::SystemZMCAsmInfoGOFF::printSpecifierExpr(), llvm::VEELFMCAsmInfo::printSpecifierExpr(), and llvm::XtensaMCAsmInfo::printSpecifierExpr().

Member Data Documentation

Expr


The documentation for this class was generated from the following files: