LLVM 20.0.0git
Public Types | Static Public Member Functions | List of all members
llvm::MCSymbolRefExpr Class Reference

Represent a reference to a symbol from inside an expression. More...

#include "llvm/MC/MCExpr.h"

Inheritance diagram for llvm::MCSymbolRefExpr:
Inheritance graph
[legend]

Public Types

enum  VariantKind : uint16_t {
  VK_None , VK_Invalid , VK_GOT , VK_GOTENT ,
  VK_GOTOFF , VK_GOTREL , VK_PCREL , VK_GOTPCREL ,
  VK_GOTPCREL_NORELAX , VK_GOTTPOFF , VK_INDNTPOFF , VK_NTPOFF ,
  VK_GOTNTPOFF , VK_PLT , VK_TLSGD , VK_TLSLD ,
  VK_TLSLDM , VK_TPOFF , VK_DTPOFF , VK_TLSCALL ,
  VK_TLSDESC , VK_TLVP , VK_TLVPPAGE , VK_TLVPPAGEOFF ,
  VK_PAGE , VK_PAGEOFF , VK_GOTPAGE , VK_GOTPAGEOFF ,
  VK_SECREL , VK_SIZE , VK_WEAKREF , VK_FUNCDESC ,
  VK_GOTFUNCDESC , VK_GOTOFFFUNCDESC , VK_TLSGD_FDPIC , VK_TLSLDM_FDPIC ,
  VK_GOTTPOFF_FDPIC , VK_X86_ABS8 , VK_X86_PLTOFF , VK_ARM_NONE ,
  VK_ARM_GOT_PREL , VK_ARM_TARGET1 , VK_ARM_TARGET2 , VK_ARM_PREL31 ,
  VK_ARM_SBREL , VK_ARM_TLSLDO , VK_ARM_TLSDESCSEQ , VK_AVR_NONE ,
  VK_AVR_LO8 , VK_AVR_HI8 , VK_AVR_HLO8 , VK_AVR_DIFF8 ,
  VK_AVR_DIFF16 , VK_AVR_DIFF32 , VK_AVR_PM , VK_PPC_LO ,
  VK_PPC_HI , VK_PPC_HA , VK_PPC_HIGH , VK_PPC_HIGHA ,
  VK_PPC_HIGHER , VK_PPC_HIGHERA , VK_PPC_HIGHEST , VK_PPC_HIGHESTA ,
  VK_PPC_GOT_LO , VK_PPC_GOT_HI , VK_PPC_GOT_HA , VK_PPC_TOCBASE ,
  VK_PPC_TOC , VK_PPC_TOC_LO , VK_PPC_TOC_HI , VK_PPC_TOC_HA ,
  VK_PPC_U , VK_PPC_L , VK_PPC_DTPMOD , VK_PPC_TPREL_LO ,
  VK_PPC_TPREL_HI , VK_PPC_TPREL_HA , VK_PPC_TPREL_HIGH , VK_PPC_TPREL_HIGHA ,
  VK_PPC_TPREL_HIGHER , VK_PPC_TPREL_HIGHERA , VK_PPC_TPREL_HIGHEST , VK_PPC_TPREL_HIGHESTA ,
  VK_PPC_DTPREL_LO , VK_PPC_DTPREL_HI , VK_PPC_DTPREL_HA , VK_PPC_DTPREL_HIGH ,
  VK_PPC_DTPREL_HIGHA , VK_PPC_DTPREL_HIGHER , VK_PPC_DTPREL_HIGHERA , VK_PPC_DTPREL_HIGHEST ,
  VK_PPC_DTPREL_HIGHESTA , VK_PPC_GOT_TPREL , VK_PPC_GOT_TPREL_LO , VK_PPC_GOT_TPREL_HI ,
  VK_PPC_GOT_TPREL_HA , VK_PPC_GOT_DTPREL , VK_PPC_GOT_DTPREL_LO , VK_PPC_GOT_DTPREL_HI ,
  VK_PPC_GOT_DTPREL_HA , VK_PPC_TLS , VK_PPC_GOT_TLSGD , VK_PPC_GOT_TLSGD_LO ,
  VK_PPC_GOT_TLSGD_HI , VK_PPC_GOT_TLSGD_HA , VK_PPC_TLSGD , VK_PPC_AIX_TLSGD ,
  VK_PPC_AIX_TLSGDM , VK_PPC_AIX_TLSIE , VK_PPC_AIX_TLSLE , VK_PPC_AIX_TLSLD ,
  VK_PPC_AIX_TLSML , VK_PPC_GOT_TLSLD , VK_PPC_GOT_TLSLD_LO , VK_PPC_GOT_TLSLD_HI ,
  VK_PPC_GOT_TLSLD_HA , VK_PPC_GOT_PCREL , VK_PPC_GOT_TLSGD_PCREL , VK_PPC_GOT_TLSLD_PCREL ,
  VK_PPC_GOT_TPREL_PCREL , VK_PPC_TLS_PCREL , VK_PPC_TLSLD , VK_PPC_LOCAL ,
  VK_PPC_NOTOC , VK_PPC_PCREL_OPT , VK_COFF_IMGREL32 , VK_Hexagon_LO16 ,
  VK_Hexagon_HI16 , VK_Hexagon_GPREL , VK_Hexagon_GD_GOT , VK_Hexagon_LD_GOT ,
  VK_Hexagon_GD_PLT , VK_Hexagon_LD_PLT , VK_Hexagon_IE , VK_Hexagon_IE_GOT ,
  VK_WASM_TYPEINDEX , VK_WASM_TLSREL , VK_WASM_MBREL , VK_WASM_TBREL ,
  VK_WASM_GOT_TLS , VK_WASM_FUNCINDEX , VK_AMDGPU_GOTPCREL32_LO , VK_AMDGPU_GOTPCREL32_HI ,
  VK_AMDGPU_REL32_LO , VK_AMDGPU_REL32_HI , VK_AMDGPU_REL64 , VK_AMDGPU_ABS32_LO ,
  VK_AMDGPU_ABS32_HI , VK_VE_HI32 , VK_VE_LO32 , VK_VE_PC_HI32 ,
  VK_VE_PC_LO32 , VK_VE_GOT_HI32 , VK_VE_GOT_LO32 , VK_VE_GOTOFF_HI32 ,
  VK_VE_GOTOFF_LO32 , VK_VE_PLT_HI32 , VK_VE_PLT_LO32 , VK_VE_TLS_GD_HI32 ,
  VK_VE_TLS_GD_LO32 , VK_VE_TPOFF_HI32 , VK_VE_TPOFF_LO32 , VK_TPREL ,
  VK_DTPREL
}
 
- Public Types inherited from llvm::MCExpr
enum  ExprKind : uint8_t {
  Binary , Constant , SymbolRef , Unary ,
  Target
}
 

Public Member Functions

Accessors
const MCSymbolgetSymbol () const
 
VariantKind getKind () const
 
bool hasSubsectionsViaSymbols () const
 
- Public Member Functions inherited from llvm::MCExpr
 MCExpr (const MCExpr &)=delete
 
MCExproperator= (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 isSymbolUsedInExpression (const MCSymbol *Sym) const
 Returns whether the given symbol is used anywhere in the expression or subexpressions.
 
bool evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm, const SectionAddrMap &Addrs) const
 Try to evaluate the expression to an absolute value.
 
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 evaluateKnownAbsolute (int64_t &Res, const MCAssembler &Asm) const
 Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g.
 
bool evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup) const
 Try to evaluate the expression to a relocatable value, i.e.
 
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.
 
MCFragmentfindAssociatedFragment () 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 bool classof (const MCExpr *E)
 
Construction
static const MCSymbolRefExprcreate (const MCSymbol *Symbol, MCContext &Ctx)
 
static const MCSymbolRefExprcreate (const MCSymbol *Symbol, VariantKind Kind, MCContext &Ctx, SMLoc Loc=SMLoc())
 
static const MCSymbolRefExprcreate (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, unsigned SubclassData=0)
 
bool evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const
 
unsigned getSubclassData () const
 

Detailed Description

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 192 of file MCExpr.h.

Member Enumeration Documentation

◆ VariantKind

Enumerator
VK_None 
VK_Invalid 
VK_GOT 
VK_GOTENT 
VK_GOTOFF 
VK_GOTREL 
VK_PCREL 
VK_GOTPCREL 
VK_GOTPCREL_NORELAX 
VK_GOTTPOFF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 
VK_AMDGPU_GOTPCREL32_LO 
VK_AMDGPU_GOTPCREL32_HI 
VK_AMDGPU_REL32_LO 
VK_AMDGPU_REL32_HI 
VK_AMDGPU_REL64 
VK_AMDGPU_ABS32_LO 
VK_AMDGPU_ABS32_HI 
VK_VE_HI32 
VK_VE_LO32 
VK_VE_PC_HI32 
VK_VE_PC_LO32 
VK_VE_GOT_HI32 
VK_VE_GOT_LO32 
VK_VE_GOTOFF_HI32 
VK_VE_GOTOFF_LO32 
VK_VE_PLT_HI32 
VK_VE_PLT_LO32 
VK_VE_TLS_GD_HI32 
VK_VE_TLS_GD_LO32 
VK_VE_TPOFF_HI32 
VK_VE_TPOFF_LO32 
VK_TPREL 
VK_DTPREL 

Definition at line 194 of file MCExpr.h.

Member Function Documentation

◆ classof()

static bool llvm::MCSymbolRefExpr::classof ( const MCExpr E)
inlinestatic

Definition at line 431 of file MCExpr.h.

References E, and llvm::MCExpr::SymbolRef.

◆ create() [1/3]

static const MCSymbolRefExpr * llvm::MCSymbolRefExpr::create ( const MCSymbol Symbol,
MCContext Ctx 
)
inlinestatic

Definition at line 398 of file MCExpr.h.

References create(), and VK_None.

Referenced by llvm::ConstantPool::addEntry(), llvm::CSKYConstantPool::addEntry(), ARM64EmitRuntimeFunction(), ARM64EmitUnwindInfoForSegment(), ARMEmitRuntimeFunction(), ARMEmitUnwindInfo(), buildSymbolDiff(), computeLabelDiff(), create(), createGOTRelExprOp(), createPCXRelExprOp(), createSparcMCOperand(), createVEMCOperand(), llvm::AMDGPUDisassembler::decodeVersionImm(), llvm::AsmPrinter::doFinalization(), llvm::AddressPool::emit(), EmitAbsDifference(), llvm::MCStreamer::emitAbsoluteSymbolDiff(), llvm::MCStreamer::emitAbsoluteSymbolDiffAsULEB128(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::TargetLoweringObjectFile::emitCGProfileMetadata(), llvm::MCWinCOFFStreamer::emitCOFFImgRel32(), llvm::MCWinCOFFStreamer::emitCOFFSecRel32(), llvm::MCWinCOFFStreamer::emitCOFFSectionIndex(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::MipsTargetELFStreamer::emitDirectiveCpsetup(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), emitDirectiveRelocJalr(), llvm::EHStreamer::emitExceptionTable(), llvm::CodeViewContext::emitFileChecksumOffset(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), llvm::AsmPrinter::emitFunctionBody(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), emitGenDwarfRanges(), llvm::AMDGPUTargetELFStreamer::EmitHSAMetadata(), llvm::ARMAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::AMDGPUTargetELFStreamer::EmitISAVersion(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), llvm::AsmPrinter::emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), llvm::X86AsmPrinter::emitKCFITypeId(), llvm::AsmPrinter::emitLabelPlusOffset(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), emitNonLazySymbolPointer(), EmitNop(), llvm::AArch64_ELFTargetObjectFile::emitPersonalityValueImpl(), llvm::MCObjectStreamer::emitRelocDirective(), EmitRuntimeFunction(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), EmitSymbolRefWithOfs(), llvm::MCStreamer::emitSymbolValue(), EmitUnwindInfo(), llvm::AVRMCELFStreamer::emitValueForModiferKind(), llvm::MCELFStreamer::emitWeakReference(), llvm::MCWasmStreamer::emitWeakReference(), llvm::MCWinCOFFStreamer::emitWeakReference(), llvm::MCXCOFFStreamer::emitXCOFFRefDirective(), llvm::AsmPrinter::emitXRayTable(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::CodeViewContext::encodeDefRange(), llvm::WasmException::endFunction(), llvm::AVRMCExpr::evaluateAsRelocatableImpl(), llvm::PPCMCExpr::evaluateAsRelocatableImpl(), llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::ELFObjectWriter::executePostLayoutBinding(), llvm::RecordStreamer::flushSymverDirectives(), forceExpAbs(), llvm::MCResourceInfo::gatherResourceInfo(), getAuthPtrSlotSymbolHelper(), llvm::TargetLoweringObjectFile::getDebugThreadLocalSymbol(), llvm::ARMElfTargetObjectFile::getDebugThreadLocalSymbol(), llvm::MipsTargetObjectFile::getDebugThreadLocalSymbol(), llvm::SystemZELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::SystemZMCInstLower::getExpr(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::RISCVMCAsmInfo::getExprForFDESymbol(), llvm::SparcELFMCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::SparcELFMCAsmInfo::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), getGlobalOffsetTable(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::AArch64_ELFTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::ARMElfTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::RISCVELFTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::X86_64MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::X86_64ELFTargetObjectFile::getIndirectSymViaGOTPCRel(), llvm::ARMElfTargetObjectFile::getIndirectSymViaRWPI(), GetOptionalAbsDifference(), llvm::TargetLowering::getPICJumpTableRelocBaseExpr(), llvm::M68kTargetLowering::getPICJumpTableRelocBaseExpr(), llvm::PPCTargetLowering::getPICJumpTableRelocBaseExpr(), llvm::X86TargetLowering::getPICJumpTableRelocBaseExpr(), GetSubDivExpr(), GetSymbolRef(), llvm::MCResourceInfo::getSymRefExpr(), getTLSGetOffset(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::ARMElfTargetObjectFile::getTTypeGlobalReference(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::HexagonLowerToMC(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), llvm::SIInstrInfo::insertIndirectBranch(), llvm::BPFMCInstLower::Lower(), llvm::LanaiMCInstLower::Lower(), llvm::MSP430MCInstLower::Lower(), llvm::AsmPrinter::lowerBlockAddressConstant(), llvm::AsmPrinter::lowerConstant(), llvm::AVRAsmPrinter::lowerConstant(), llvm::M68kTargetLowering::LowerCustomJumpTableEntry(), llvm::RISCVTargetLowering::LowerCustomJumpTableEntry(), llvm::VETargetLowering::LowerCustomJumpTableEntry(), llvm::X86TargetLowering::LowerCustomJumpTableEntry(), llvm::TargetLoweringObjectFileELF::lowerDSOLocalEquivalent(), llvm::AVRMCInstLower::lowerInstruction(), llvm::ARMAsmPrinter::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), AMDGPUMCInstLower::lowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), LowerSymbolOperand(), llvm::XtensaAsmPrinter::LowerSymbolOperand(), llvm::BPFMCInstLower::LowerSymbolOperand(), llvm::CSKYMCInstLower::lowerSymbolOperand(), llvm::LanaiMCInstLower::LowerSymbolOperand(), llvm::M68kMCInstLower::LowerSymbolOperand(), llvm::MSP430MCInstLower::LowerSymbolOperand(), lowerSymbolOperand(), llvm::AVRMCInstLower::lowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandCOFF(), llvm::AArch64MCInstLower::lowerSymbolOperandELF(), llvm::AArch64MCInstLower::lowerSymbolOperandMachO(), makeEndMinusStartExpr(), makeStartPlusIntExpr(), llvm::MCAsmParserExtension::parseDirectiveCGProfile(), llvm::FaultMaps::recordFaultingOp(), llvm::LoongArchAsmBackend::shouldInsertFixupForCodeAlign(), llvm::AMDGPUSymbolizer::tryAddingSymbolicOperand(), llvm::MCExternalSymbolizer::tryAddingSymbolicOperand(), and llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand().

◆ create() [2/3]

const MCSymbolRefExpr * MCSymbolRefExpr::create ( const MCSymbol Symbol,
VariantKind  Kind,
MCContext Ctx,
SMLoc  Loc = SMLoc() 
)
static

Definition at line 238 of file MCExpr.cpp.

References llvm::MCContext::getAsmInfo(), and Sym.

◆ create() [3/3]

const MCSymbolRefExpr * MCSymbolRefExpr::create ( StringRef  Name,
VariantKind  Kind,
MCContext Ctx 
)
static

Definition at line 244 of file MCExpr.cpp.

References create(), llvm::MCContext::getOrCreateSymbol(), and Name.

◆ getKind()

VariantKind llvm::MCSymbolRefExpr::getKind ( ) const
inline

◆ getSymbol()

const MCSymbol & llvm::MCSymbolRefExpr::getSymbol ( ) const
inline

◆ getVariantKindForName()

MCSymbolRefExpr::VariantKind MCSymbolRefExpr::getVariantKindForName ( StringRef  Name)
static

Definition at line 435 of file MCExpr.cpp.

References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), Name, VK_AMDGPU_ABS32_HI, VK_AMDGPU_ABS32_LO, VK_AMDGPU_GOTPCREL32_HI, VK_AMDGPU_GOTPCREL32_LO, VK_AMDGPU_REL32_HI, VK_AMDGPU_REL32_LO, VK_AMDGPU_REL64, VK_AVR_HI8, VK_AVR_HLO8, VK_AVR_LO8, VK_COFF_IMGREL32, VK_DTPOFF, VK_DTPREL, VK_GOT, VK_GOTENT, VK_GOTNTPOFF, VK_GOTOFF, VK_GOTPAGE, VK_GOTPAGEOFF, VK_GOTPCREL, VK_GOTPCREL_NORELAX, VK_GOTREL, VK_GOTTPOFF, VK_Hexagon_GD_GOT, VK_Hexagon_GD_PLT, VK_Hexagon_IE, VK_Hexagon_IE_GOT, VK_Hexagon_LD_GOT, VK_Hexagon_LD_PLT, VK_INDNTPOFF, VK_Invalid, VK_NTPOFF, VK_PAGE, VK_PAGEOFF, VK_PCREL, VK_PLT, VK_PPC_DTPMOD, VK_PPC_DTPREL_HA, VK_PPC_DTPREL_HI, VK_PPC_DTPREL_HIGH, VK_PPC_DTPREL_HIGHA, VK_PPC_DTPREL_HIGHER, VK_PPC_DTPREL_HIGHERA, VK_PPC_DTPREL_HIGHEST, VK_PPC_DTPREL_HIGHESTA, VK_PPC_DTPREL_LO, VK_PPC_GOT_DTPREL, VK_PPC_GOT_DTPREL_HA, VK_PPC_GOT_DTPREL_HI, VK_PPC_GOT_DTPREL_LO, VK_PPC_GOT_HA, VK_PPC_GOT_HI, VK_PPC_GOT_LO, VK_PPC_GOT_PCREL, VK_PPC_GOT_TLSGD, VK_PPC_GOT_TLSGD_HA, VK_PPC_GOT_TLSGD_HI, VK_PPC_GOT_TLSGD_LO, VK_PPC_GOT_TLSGD_PCREL, VK_PPC_GOT_TLSLD, VK_PPC_GOT_TLSLD_HA, VK_PPC_GOT_TLSLD_HI, VK_PPC_GOT_TLSLD_LO, VK_PPC_GOT_TLSLD_PCREL, VK_PPC_GOT_TPREL, VK_PPC_GOT_TPREL_HA, VK_PPC_GOT_TPREL_HI, VK_PPC_GOT_TPREL_LO, VK_PPC_GOT_TPREL_PCREL, VK_PPC_HA, VK_PPC_HI, VK_PPC_HIGH, VK_PPC_HIGHA, VK_PPC_HIGHER, VK_PPC_HIGHERA, VK_PPC_HIGHEST, VK_PPC_HIGHESTA, VK_PPC_L, VK_PPC_LO, VK_PPC_LOCAL, VK_PPC_NOTOC, VK_PPC_TLS, VK_PPC_TLS_PCREL, VK_PPC_TOC, VK_PPC_TOC_HA, VK_PPC_TOC_HI, VK_PPC_TOC_LO, VK_PPC_TOCBASE, VK_PPC_TPREL_HA, VK_PPC_TPREL_HI, VK_PPC_TPREL_HIGH, VK_PPC_TPREL_HIGHA, VK_PPC_TPREL_HIGHER, VK_PPC_TPREL_HIGHERA, VK_PPC_TPREL_HIGHEST, VK_PPC_TPREL_HIGHESTA, VK_PPC_TPREL_LO, VK_PPC_U, VK_SECREL, VK_SIZE, VK_TLSCALL, VK_TLSDESC, VK_TLSGD, VK_TLSLD, VK_TLSLDM, VK_TLVP, VK_TLVPPAGE, VK_TLVPPAGEOFF, VK_TPOFF, VK_TPREL, VK_VE_GOT_HI32, VK_VE_GOT_LO32, VK_VE_GOTOFF_HI32, VK_VE_GOTOFF_LO32, VK_VE_HI32, VK_VE_LO32, VK_VE_PC_HI32, VK_VE_PC_LO32, VK_VE_PLT_HI32, VK_VE_PLT_LO32, VK_VE_TLS_GD_HI32, VK_VE_TLS_GD_LO32, VK_VE_TPOFF_HI32, VK_VE_TPOFF_LO32, VK_WASM_FUNCINDEX, VK_WASM_GOT_TLS, VK_WASM_MBREL, VK_WASM_TBREL, VK_WASM_TLSREL, VK_WASM_TYPEINDEX, VK_X86_ABS8, and VK_X86_PLTOFF.

Referenced by llvm::MCTargetAsmParser::getVariantKindForName().

◆ getVariantKindName()

StringRef MCSymbolRefExpr::getVariantKindName ( VariantKind  Kind)
static

Definition at line 249 of file MCExpr.cpp.

References llvm_unreachable, VK_AMDGPU_ABS32_HI, VK_AMDGPU_ABS32_LO, VK_AMDGPU_GOTPCREL32_HI, VK_AMDGPU_GOTPCREL32_LO, VK_AMDGPU_REL32_HI, VK_AMDGPU_REL32_LO, VK_AMDGPU_REL64, VK_ARM_GOT_PREL, VK_ARM_NONE, VK_ARM_PREL31, VK_ARM_SBREL, VK_ARM_TARGET1, VK_ARM_TARGET2, VK_ARM_TLSDESCSEQ, VK_ARM_TLSLDO, VK_AVR_DIFF16, VK_AVR_DIFF32, VK_AVR_DIFF8, VK_AVR_HI8, VK_AVR_HLO8, VK_AVR_LO8, VK_AVR_NONE, VK_AVR_PM, VK_COFF_IMGREL32, VK_DTPOFF, VK_DTPREL, VK_FUNCDESC, VK_GOT, VK_GOTENT, VK_GOTFUNCDESC, VK_GOTNTPOFF, VK_GOTOFF, VK_GOTOFFFUNCDESC, VK_GOTPAGE, VK_GOTPAGEOFF, VK_GOTPCREL, VK_GOTPCREL_NORELAX, VK_GOTREL, VK_GOTTPOFF, VK_GOTTPOFF_FDPIC, VK_Hexagon_GD_GOT, VK_Hexagon_GD_PLT, VK_Hexagon_GPREL, VK_Hexagon_HI16, VK_Hexagon_IE, VK_Hexagon_IE_GOT, VK_Hexagon_LD_GOT, VK_Hexagon_LD_PLT, VK_Hexagon_LO16, VK_INDNTPOFF, VK_Invalid, VK_None, VK_NTPOFF, VK_PAGE, VK_PAGEOFF, VK_PCREL, VK_PLT, VK_PPC_AIX_TLSGD, VK_PPC_AIX_TLSGDM, VK_PPC_AIX_TLSIE, VK_PPC_AIX_TLSLD, VK_PPC_AIX_TLSLE, VK_PPC_AIX_TLSML, VK_PPC_DTPMOD, VK_PPC_DTPREL_HA, VK_PPC_DTPREL_HI, VK_PPC_DTPREL_HIGH, VK_PPC_DTPREL_HIGHA, VK_PPC_DTPREL_HIGHER, VK_PPC_DTPREL_HIGHERA, VK_PPC_DTPREL_HIGHEST, VK_PPC_DTPREL_HIGHESTA, VK_PPC_DTPREL_LO, VK_PPC_GOT_DTPREL, VK_PPC_GOT_DTPREL_HA, VK_PPC_GOT_DTPREL_HI, VK_PPC_GOT_DTPREL_LO, VK_PPC_GOT_HA, VK_PPC_GOT_HI, VK_PPC_GOT_LO, VK_PPC_GOT_PCREL, VK_PPC_GOT_TLSGD, VK_PPC_GOT_TLSGD_HA, VK_PPC_GOT_TLSGD_HI, VK_PPC_GOT_TLSGD_LO, VK_PPC_GOT_TLSGD_PCREL, VK_PPC_GOT_TLSLD, VK_PPC_GOT_TLSLD_HA, VK_PPC_GOT_TLSLD_HI, VK_PPC_GOT_TLSLD_LO, VK_PPC_GOT_TLSLD_PCREL, VK_PPC_GOT_TPREL, VK_PPC_GOT_TPREL_HA, VK_PPC_GOT_TPREL_HI, VK_PPC_GOT_TPREL_LO, VK_PPC_GOT_TPREL_PCREL, VK_PPC_HA, VK_PPC_HI, VK_PPC_HIGH, VK_PPC_HIGHA, VK_PPC_HIGHER, VK_PPC_HIGHERA, VK_PPC_HIGHEST, VK_PPC_HIGHESTA, VK_PPC_L, VK_PPC_LO, VK_PPC_LOCAL, VK_PPC_NOTOC, VK_PPC_PCREL_OPT, VK_PPC_TLS, VK_PPC_TLS_PCREL, VK_PPC_TLSGD, VK_PPC_TLSLD, VK_PPC_TOC, VK_PPC_TOC_HA, VK_PPC_TOC_HI, VK_PPC_TOC_LO, VK_PPC_TOCBASE, VK_PPC_TPREL_HA, VK_PPC_TPREL_HI, VK_PPC_TPREL_HIGH, VK_PPC_TPREL_HIGHA, VK_PPC_TPREL_HIGHER, VK_PPC_TPREL_HIGHERA, VK_PPC_TPREL_HIGHEST, VK_PPC_TPREL_HIGHESTA, VK_PPC_TPREL_LO, VK_PPC_U, VK_SECREL, VK_SIZE, VK_TLSCALL, VK_TLSDESC, VK_TLSGD, VK_TLSGD_FDPIC, VK_TLSLD, VK_TLSLDM, VK_TLSLDM_FDPIC, VK_TLVP, VK_TLVPPAGE, VK_TLVPPAGEOFF, VK_TPOFF, VK_TPREL, VK_VE_GOT_HI32, VK_VE_GOT_LO32, VK_VE_GOTOFF_HI32, VK_VE_GOTOFF_LO32, VK_VE_HI32, VK_VE_LO32, VK_VE_PC_HI32, VK_VE_PC_LO32, VK_VE_PLT_HI32, VK_VE_PLT_LO32, VK_VE_TLS_GD_HI32, VK_VE_TLS_GD_LO32, VK_VE_TPOFF_HI32, VK_VE_TPOFF_LO32, VK_WASM_FUNCINDEX, VK_WASM_GOT_TLS, VK_WASM_MBREL, VK_WASM_TBREL, VK_WASM_TLSREL, VK_WASM_TYPEINDEX, VK_WEAKREF, VK_X86_ABS8, and VK_X86_PLTOFF.

Referenced by llvm::MCExpr::print(), and llvm::PPCInstPrinter::printTLSCall().

◆ hasSubsectionsViaSymbols()

bool llvm::MCSymbolRefExpr::hasSubsectionsViaSymbols ( ) const
inline

Definition at line 417 of file MCExpr.h.

References llvm::MCExpr::getSubclassData().

Referenced by llvm::MCExpr::evaluateAsRelocatableImpl().


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