|
LLVM
10.0.0
|
Represent a reference to a symbol from inside an expression. More...
#include "llvm/MC/MCExpr.h"
Public Member Functions | |
Accessors | |
| const MCSymbol & | getSymbol () const |
| VariantKind | getKind () const |
| void | printVariantKind (raw_ostream &OS) const |
| bool | hasSubsectionsViaSymbols () const |
Public Member Functions inherited from llvm::MCExpr | |
| MCExpr (const MCExpr &)=delete | |
| MCExpr & | operator= (const MCExpr &)=delete |
| ExprKind | getKind () const |
| SMLoc | getLoc () const |
| void | print (raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const |
| void | dump () const |
| bool | evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout, const SectionAddrMap &Addrs) const |
| Try to evaluate the expression to an absolute value. More... | |
| bool | evaluateAsAbsolute (int64_t &Res) const |
| bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const |
| bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const |
| bool | evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout) const |
| bool | evaluateKnownAbsolute (int64_t &Res, const MCAsmLayout &Layout) const |
| bool | evaluateAsRelocatable (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const |
| Try to evaluate the expression to a relocatable value, i.e. More... | |
| bool | evaluateAsValue (MCValue &Res, const MCAsmLayout &Layout) const |
| Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. More... | |
| 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. More... | |
Static Public Member Functions | |
| static bool | classof (const MCExpr *E) |
Construction | |
| static const MCSymbolRefExpr * | create (const MCSymbol *Symbol, MCContext &Ctx) |
| static const MCSymbolRefExpr * | create (const MCSymbol *Symbol, VariantKind Kind, MCContext &Ctx, SMLoc Loc=SMLoc()) |
| static const MCSymbolRefExpr * | create (StringRef Name, VariantKind Kind, MCContext &Ctx) |
Static Utility Functions | |
| static StringRef | getVariantKindName (VariantKind Kind) |
| static VariantKind | getVariantKindForName (StringRef Name) |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCExpr | |
| MCExpr (ExprKind Kind, SMLoc Loc) | |
| bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const |
Represent a reference to a symbol from inside an expression.
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.
Definition at line 360 of file MCExpr.h.
References llvm::MCExpr::getKind(), and llvm::MCExpr::SymbolRef.
|
inlinestatic |
Definition at line 329 of file MCExpr.h.
References Name.
Referenced by llvm::ConstantPool::addEntry(), addNegOperand(), llvm::ARCMCInstLower::ARCMCInstLower(), ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfo(), buildSymbolDiff(), NoAutoPaddingScope::changeAndComment(), ConvertDoubleToBytes(), convertTailJumpOpcode(), covertDoubleImmToSingleImm(), createPCXRelExprOp(), createSparcMCOperand(), llvm::AsmPrinter::doFinalization(), llvm::AddressPool::emit(), EmitAbsDifference(), llvm::MCStreamer::emitAbsoluteSymbolDiff(), llvm::MCStreamer::emitAbsoluteSymbolDiffAsULEB128(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::MCWinCOFFStreamer::EmitCOFFImgRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSecRel32(), llvm::MCWinCOFFStreamer::EmitCOFFSectionIndex(), llvm::AsmPrinter::EmitDebugValue(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::MipsTargetELFStreamer::emitDirectiveCpsetup(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), emitDirectiveRelocJalr(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), llvm::CodeViewContext::emitFileChecksumOffset(), llvm::AsmPrinter::EmitFunctionBody(), EmitGenDwarfAranges(), EmitGenDwarfRanges(), llvm::AMDGPUTargetELFStreamer::EmitHSAMetadata(), llvm::MCELFStreamer::EmitIdent(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::AMDGPUTargetELFStreamer::EmitISAVersion(), llvm::ARMAsmPrinter::EmitJumpTableAddrs(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::ARMAsmPrinter::EmitJumpTableInsts(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), llvm::AsmPrinter::EmitLabelPlusOffset(), llvm::SystemZAsmPrinter::EmitMachineConstantPoolValue(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::TargetLoweringObjectFileELF::emitModuleMetadata(), emitNonLazySymbolPointer(), EmitNop(), llvm::MCObjectStreamer::EmitRelocDirective(), EmitRuntimeFunction(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), EmitSymbolRefWithOfs(), llvm::MCStreamer::EmitSymbolValue(), EmitUnwindInfo(), llvm::AVRMCELFStreamer::EmitValueForModiferKind(), llvm::MCELFStreamer::EmitWeakReference(), llvm::MCWasmStreamer::EmitWeakReference(), llvm::ARMAsmPrinter::EmitXXStructor(), llvm::CodeViewContext::encodeDefRange(), llvm::WinException::endFunclet(), llvm::WasmException::endFunction(), llvm::AVRMCExpr::evaluateAsRelocatableImpl(), llvm::PPCMCExpr::evaluateAsRelocatableImpl(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), GetAbsDifference(), GetAEABIUnwindPersonalityName(), llvm::ARMElfTargetObjectFile::getDebugThreadLocalSymbol(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::TargetLoweringObjectFile::getDebugThreadLocalSymbol(), getDwarfRegNum(), llvm::SystemZMCInstLower::getExpr(), llvm::RISCVMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getGlobalOffsetTable(), llvm::X86_64MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::X86TargetLowering::getPICJumpTableRelocBaseExpr(), llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(), llvm::TargetLowering::getPICJumpTableRelocBaseExpr(), getRealVLDOpcode(), GetSymbolRef(), getTLSGetOffset(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), getVariantKind(), llvm::HexagonLowerToMC(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), incrementLoc(), llvm::XCoreMCInstLower::Initialize(), llvm::MipsMCInstLower::Initialize(), llvm::IsCPSRDead< MCInst >(), isIFunc(), llvm::MSP430MCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::AsmPrinter::lowerConstant(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::AVRMCInstLower::lowerInstruction(), llvm::AArch64MCInstLower::lowerOperand(), llvm::MipsMCInstLower::LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), lowerSymbolOperand(), LowerSymbolOperand(), llvm::AVRMCInstLower::lowerSymbolOperand(), llvm::MSP430MCInstLower::LowerSymbolOperand(), llvm::BPFMCInstLower::LowerSymbolOperand(), llvm::LanaiMCInstLower::LowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), llvm::AArch64MCInstLower::lowerSymbolOperandDarwin(), llvm::AArch64MCInstLower::lowerSymbolOperandELF(), makeCombineInst(), matchRegisterNameHelper(), MCAttrForString(), needsExpandMemInst(), nextReg(), parseImmediate(), printFPOReg(), printMCExpr(), llvm::FaultMaps::recordFaultingOp(), RefineErrorLoc(), llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand(), llvm::MCExternalSymbolizer::tryAddingSymbolicOperand(), llvm::AMDGPUSymbolizer::tryAddingSymbolicOperand(), and VisitGlobalVariableForEmission().
|
static |
Definition at line 185 of file MCExpr.cpp.
|
static |
Definition at line 191 of file MCExpr.cpp.
|
inline |
Definition at line 344 of file MCExpr.h.
Referenced by addNegOperand(), canUseLocalRelocation(), llvm::MCELFStreamer::EmitIdent(), llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::AVRMCExpr::evaluateAsRelocatableImpl(), llvm::PPCMCExpr::evaluateAsRelocatableImpl(), llvm::RISCVAsmBackend::evaluateTargetFixup(), llvm::MCAssembler::Finish(), fixELFSymbolsInTLSFixupsImpl(), llvm::MCValue::getAccessVariant(), llvm::MCAssembler::getAtom(), getFixupKindLog2Size(), getRelocType(), hasSecRelSymbolRef(), incrementLoc(), isIFunc(), isNonILP32reloc(), isPCRel(), isPCRel32Branch(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolved(), llvm::MCAssembler::isThumbFunc(), needsExpandMemInst(), llvm::MCExpr::print(), printExpr(), printSImmOperand(), and shouldBeSls().
Definition at line 342 of file MCExpr.h.
References llvm::ARMBuildAttrs::Symbol.
Referenced by addNegOperand(), canUseLocalRelocation(), ConvertDoubleToBytes(), llvm::MCELFStreamer::EmitIdent(), llvm::MCObjectStreamer::EmitRelocDirective(), llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::AVRMCExpr::evaluateAsRelocatableImpl(), llvm::PPCMCExpr::evaluateAsRelocatableImpl(), EvaluateCRExpr(), llvm::RISCVAsmBackend::evaluateTargetFixup(), llvm::MCExpr::findAssociatedFragment(), fixELFSymbolsInTLSFixupsImpl(), GetAEABIUnwindPersonalityName(), getARMFixupKindMachOInfo(), llvm::MCAssembler::getAtom(), llvm::MCAsmLayout::getBaseSymbol(), getFixupKindLog2Size(), getFixupKindNumBytes(), getFixupOffset(), getFixupSection(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::RISCVMCExpr::getPCRelHiFixup(), llvm::MachObjectWriter::getSymbolAddress(), getSymbolOffsetImpl(), getSymbolValue(), handleIndirectSymViaGOTPCRel(), hasGOTReference(), isIFunc(), isShiftedUIntAtAnyPosition(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolved(), llvm::MCAssembler::isThumbFunc(), llvm::MCExpr::print(), PrintCFIEscape(), printExpr(), printSImmOperand(), RefineErrorLoc(), llvm::ARMAsmBackend::shouldForceRelocation(), and startsWithGlobalOffsetTable().
|
static |
Definition at line 329 of file MCExpr.cpp.
Referenced by altMacroString().
|
static |
Definition at line 196 of file MCExpr.cpp.
Referenced by llvm::PPCInstPrinter::printTLSCall().
|
inline |
Definition at line 348 of file MCExpr.h.
Referenced by llvm::MCExpr::evaluateAsRelocatableImpl().
| void MCSymbolRefExpr::printVariantKind | ( | raw_ostream & | OS | ) | const |
Definition at line 446 of file MCExpr.cpp.
Referenced by llvm::MCExpr::print().
1.8.13