LLVM: llvm::MCSymbol Class Reference (original) (raw)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created and uniqued by the MCContext class. More...
#include "[llvm/MC/MCSymbol.h](MCSymbol%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| StringRef | getName () const |
| getName - Get the symbol name. | |
| bool | isRegistered () const |
| void | setIsRegistered (bool Value) const |
| void | setUsedInReloc () const |
| bool | isUsedInReloc () const |
| uint32_t | getIndex () const |
| Get the (implementation defined) index. | |
| void | setIndex (uint32_t Value) const |
| Set the (implementation defined) index. | |
| uint64_t | getOffset () const |
| void | setOffset (uint64_t Value) |
| uint64_t | getCommonSize () const |
| Return the size of a 'common' symbol. | |
| void | setCommon (uint64_t Size, Align Alignment) |
| Mark this symbol as being 'common'. | |
| MaybeAlign | getCommonAlignment () const |
| Return the alignment of a 'common' symbol. | |
| bool | declareCommon (uint64_t Size, Align Alignment) |
| Declare this symbol as being 'common'. | |
| bool | isCommon () const |
| Is this a 'common' symbol. | |
| MCFragment * | getFragment () const |
| bool | isWeakExternal () const |
| LLVM_ABI void | print (raw_ostream &OS, const MCAsmInfo *MAI) const |
| print - Print the value to the stream OS. | |
| LLVM_ABI void | dump () const |
| dump - Print the value to stderr. | |
| Accessors | |
| bool | isTemporary () const |
| isTemporary - Check if this is an assembler temporary symbol. | |
| bool | isRedefinable () const |
| Check if this symbol is redefinable. | |
| void | setRedefinable (bool Value) |
| Mark this symbol as redefinable. | |
| void | redefineIfPossible () |
| Prepare this symbol to be redefined. | |
| bool | isResolving () const |
| void | setIsResolving (bool V) |
| Associated Sections | |
| bool | isDefined () const |
| isDefined - Check if this symbol is defined (i.e., it has an address). | |
| bool | isInSection () const |
| isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute). | |
| bool | isUndefined () const |
| isUndefined - Check if this symbol undefined (i.e., implicitly defined). | |
| bool | isAbsolute () const |
| isAbsolute - Check if this is an absolute symbol. | |
| MCSection & | getSection () const |
| Get the section associated with a defined, non-absolute symbol. | |
| void | setFragment (MCFragment *F) const |
| Mark the symbol as defined in the fragment F. | |
| Variable Symbols | |
| bool | isVariable () const |
| isVariable - Check if this is a variable symbol. | |
| const MCExpr * | getVariableValue () const |
| Get the expression of the variable symbol. | |
| LLVM_ABI void | setVariableValue (const MCExpr *Value) |
| Protected Types | |
|---|---|
| enum | Kind : uint8_t { Regular, Equated, Common } |
| enum | : unsigned { NumCommonAlignmentBits = 5 } |
| The alignment of the symbol if it is 'common'. More... | |
| enum | : unsigned { NumFlagsBits = 16 } |
| The Flags field is used by object file implementations to store additional per symbol information which is not easily classified. More... | |
| using | NameEntryStorageTy |
| The name for a symbol. |
| Protected Member Functions | |
|---|---|
| MCSymbol (const MCSymbolTableEntry *Name, bool isTemporary) | |
| MCSymbol (const MCSymbol &)=default | |
| MCSymbol & | operator= (const MCSymbol &)=delete |
| LLVM_ABI void * | operator new (size_t s, const MCSymbolTableEntry *Name, MCContext &Ctx) |
| uint32_t | getFlags () const |
| Get the (implementation defined) symbol flags. | |
| void | setFlags (uint32_t Value) const |
| Set the (implementation defined) symbol flags. | |
| void | modifyFlags (uint32_t Value, uint32_t Mask) const |
| Modify the flags via a mask. |
| Protected Attributes | |
|---|---|
| MCFragment * | Fragment = nullptr |
| If a symbol has a Fragment, the section is implied, so we only need one pointer. | |
| unsigned | kind: 2 |
| The symbol kind. | |
| unsigned | HasName: 1 |
| True if this symbol is named. | |
| unsigned | IsTemporary: 1 |
| IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table. | |
| unsigned | IsRedefinable: 1 |
| True if this symbol can be redefined. | |
| unsigned | IsRegistered: 1 |
| unsigned | IsExternal: 1 |
| True if this symbol is visible outside this translation unit. | |
| unsigned | IsPrivateExtern: 1 |
| Mach-O specific: This symbol is private extern. | |
| unsigned | IsWeakExternal: 1 |
| This symbol is weak external. | |
| unsigned | IsUsedInReloc: 1 |
| True if we have created a relocation that uses this symbol. | |
| unsigned | IsResolving: 1 |
| Used to detect cyclic dependency like a = a + 1 and a = b; b = a. | |
| unsigned | CommonAlignLog2: NumCommonAlignmentBits |
| uint32_t | Flags: NumFlagsBits |
| uint32_t | Index = 0 |
| Index field, for use by the object file implementation. | |
| union { | |
| uint64_t Offset | |
| The offset to apply to the fragment address to form this symbol's value. More... | |
| uint64_t CommonSize | |
| The size of the symbol, if it is 'common'. More... | |
| const MCExpr * Value | |
| If non-null, the value for a variable symbol. More... | |
| }; |
| Friends | |
|---|---|
| class | MCExpr |
| class | MCContext |
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created and uniqued by the MCContext class.
MCSymbols should only be constructed with valid names for the object file.
If the symbol is defined/emitted into the current translation unit, the Section member is set to indicate what section it lives in. Otherwise, if it is a reference to an external entity, it has a null section.
Definition at line 42 of file MCSymbol.h.
◆ NameEntryStorageTy
Initial value:
union {
}
StringMapEntry< MCSymbolTableValue > MCSymbolTableEntry
MCContext stores MCSymbolTableValue in a string map (see MCSymbol::operator new).
The name for a symbol.
MCSymbol contains a uint64_t so is probably aligned to 8. On a 32-bit system, the name is a pointer so isn't going to satisfy the 8 byte alignment of uint64_t. Account for that here.
Definition at line 141 of file MCSymbol.h.
◆ anonymous enum
The Flags field is used by object file implementations to store additional per symbol information which is not easily classified.
| Enumerator |
|---|
| NumFlagsBits |
Definition at line 116 of file MCSymbol.h.
◆ anonymous enum
The alignment of the symbol if it is 'common'.
Internally, this is stored as log2(align) + 1. We reserve 5 bits to encode this value which allows the following values 0b00000 -> unset 0b00001 -> 1ULL << 0 = 1 0b00010 -> 1ULL << 1 = 2 0b00011 -> 1ULL << 2 = 4 ... 0b11111 -> 1ULL << 30 = 1 GiB
| Enumerator |
|---|
| NumCommonAlignmentBits |
Definition at line 111 of file MCSymbol.h.
◆ Kind
| Enumerator |
|---|
| Regular |
| Equated |
| Common |
Definition at line 45 of file MCSymbol.h.
◆ MCSymbol() [1/2]
Definition at line 146 of file MCSymbol.h.
References CommonAlignLog2, Flags, HasName, IsExternal, IsPrivateExtern, IsRedefinable, IsRegistered, IsResolving, IsTemporary, isTemporary(), IsUsedInReloc, IsWeakExternal, kind, Offset, and Regular.
Referenced by MCSymbol(), llvm::MCSymbolCOFF::MCSymbolCOFF(), llvm::MCSymbolELF::MCSymbolELF(), llvm::MCSymbolGOFF::MCSymbolGOFF(), llvm::MCSymbolMachO::MCSymbolMachO(), llvm::MCSymbolWasm::MCSymbolWasm(), llvm::MCSymbolXCOFF::MCSymbolXCOFF(), operator new(), and operator=().
◆ MCSymbol() [2/2]
◆ declareCommon()
◆ dump()
◆ getCommonAlignment()
| MaybeAlign llvm::MCSymbol::getCommonAlignment ( ) const | inline |
|---|
◆ getCommonSize()
| uint64_t llvm::MCSymbol::getCommonSize ( ) const | inline |
|---|
◆ getFlags()
| uint32_t llvm::MCSymbol::getFlags ( ) const | inlineprotected |
|---|
Get the (implementation defined) symbol flags.
Definition at line 366 of file MCSymbol.h.
References Flags.
Referenced by llvm::MCSymbolCOFF::getClass(), llvm::MCSymbolMachO::getEncodedFlags(), llvm::MCSymbolCOFF::getWeakExternalCharacteristics(), llvm::MCSymbolGOFF::hasLDAttributes(), llvm::MCSymbolMachO::isAltEntry(), llvm::MCSymbolELF::isBindingSet(), llvm::MCSymbolMachO::isCold(), llvm::MCSymbolXCOFF::isEHInfo(), llvm::MCSymbolWasm::isExported(), llvm::MCSymbolELF::isMemtag(), llvm::MCSymbolMachO::isNoDeadStrip(), llvm::MCSymbolWasm::isNoStrip(), llvm::MCSymbolCOFF::isSafeSEH(), llvm::MCSymbolELF::isSignature(), llvm::MCSymbolMachO::isSymbolResolver(), llvm::MCSymbolWasm::isTLS(), llvm::MCSymbolMachO::isWeakDefinition(), llvm::MCSymbolELF::isWeakref(), llvm::MCSymbolMachO::isWeakReference(), llvm::MCSymbolELF::setBinding(), llvm::MCSymbolELF::setIsSignature(), llvm::MCSymbolELF::setIsWeakref(), llvm::MCSymbolELF::setMemtag(), llvm::MCSymbolELF::setOther(), llvm::MCSymbolELF::setType(), and llvm::MCSymbolELF::setVisibility().
◆ getFragment()
| MCFragment * llvm::MCSymbol::getFragment ( ) const | inline |
|---|
Definition at line 346 of file MCSymbol.h.
References llvm::MCExpr::findAssociatedFragment(), Fragment, getVariableValue(), isVariable(), and isWeakExternal().
Referenced by attemptToFoldSymbolOffsetDifference(), llvm::MCExpr::findAssociatedFragment(), llvm::MachObjectWriter::getAtom(), getLabelOffset(), getPCRelHiFixup(), getSection(), llvm::MachObjectWriter::getSymbolAddress(), isAbsolute(), isInSection(), llvm::isRangeRelaxable(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolved(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), isUndefined(), and llvm::LoongArchAsmBackend::relaxAlign().
◆ getIndex()
| uint32_t llvm::MCSymbol::getIndex ( ) const | inline |
|---|
◆ getName()
| StringRef llvm::MCSymbol::getName ( ) const | inline |
|---|
getName - Get the symbol name.
Definition at line 188 of file MCSymbol.h.
References HasName.
Referenced by llvm::MCResourceInfo::createTotalNumSGPRs(), llvm::MCResourceInfo::createTotalNumVGPRs(), llvm::SystemZTargetHLASMStreamer::createWordDiffExpr(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::emitCOFFReplaceableFunctionData(), llvm::MipsTargetAsmStreamer::emitDirectiveCpsetup(), llvm::EHStreamer::emitExceptionTable(), llvm::WebAssemblyTargetAsmStreamer::emitExportName(), llvm::WebAssemblyTargetAsmStreamer::emitFunctionType(), llvm::WebAssemblyTargetAsmStreamer::emitGlobalType(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::WebAssemblyTargetAsmStreamer::emitImportModule(), llvm::WebAssemblyTargetAsmStreamer::emitImportName(), llvm::XtensaTargetAsmStreamer::emitLiteral(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::WebAssemblyTargetAsmStreamer::emitTableType(), llvm::WebAssemblyTargetAsmStreamer::emitTagType(), llvm::NVPTXTargetStreamer::emitValue(), llvm::MCStreamer::emitWinCFIBeginEpilogue(), llvm::MCStreamer::emitWinCFIEndEpilogue(), llvm::MCStreamer::emitWinCFIUnwindV2Start(), llvm::MCStreamer::emitWinCFIUnwindVersion(), llvm::MCExpr::evaluateAsRelocatableImpl(), EvaluateCRExpr(), llvm::ELFObjectWriter::executePostLayoutBinding(), llvm::RecordStreamer::flushSymverDirectives(), llvm::MCResourceInfo::gatherResourceInfo(), llvm::MCContext::getAssociativeCOFFSection(), getAuthPtrSlotSymbolHelper(), llvm::MCAssembler::getBaseSymbol(), llvm::MCContext::getCOFFSection(), llvm::MCContext::getELFSection(), llvm::MCSymbolMachO::getEncodedFlags(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::MCSymbolWasm::getImportName(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getLabelOffset(), llvm::NVPTXTargetLowering::getParamName(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), getStaticStructorSection(), llvm::MachObjectWriter::getSymbolAddress(), getSymbolOffsetImpl(), llvm::MCSymbolXCOFF::getUnqualifiedName(), llvm::MCContext::getWasmSection(), hasGOTReference(), llvm::MCAsmBackend::isDarwinCanonicalPersonality(), print(), llvm::X86Operand::print(), llvm::WebAssemblyInstPrinter::printCatchList(), llvm::BPFAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::SystemZInstPrinterCommon::printPCRelTLSOperand(), llvm::NVPTXInstPrinter::printProtoIdent(), llvm::PPCInstPrinter::printTLSCall(), llvm::MCContext::registerInlineAsmLabel(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), smallData(), llvm::stableHashValue(), startsWithGlobalOffsetTable(), and llvm::WinCOFFWriter::writeObject().
◆ getOffset()
| uint64_t llvm::MCSymbol::getOffset ( ) const | inline |
|---|
◆ getSection()
| MCSection & llvm::MCSymbol::getSection ( ) const | inline |
|---|
Get the section associated with a defined, non-absolute symbol.
Definition at line 251 of file MCSymbol.h.
References assert(), getFragment(), llvm::MCFragment::getParent(), and isInSection().
Referenced by llvm::MCLineSection::addEndEntry(), llvm::LoongArchAsmBackend::addReloc(), llvm::BTFDebug::beginFunctionImpl(), emitRangeList(), llvm::CodeViewContext::encodeInlineLineTable(), llvm::RISCVAsmBackend::evaluateFixup(), llvm::ELFObjectWriter::executePostLayoutBinding(), llvm::MCContext::getCOFFSection(), llvm::DwarfDebug::insertSectionLabel(), llvm::ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::ELFObjectWriter::useSectionSymbol(), and llvm::WinCOFFWriter::writeObject().
◆ getVariableValue()
| const MCExpr * llvm::MCSymbol::getVariableValue ( ) const | inline |
|---|
Get the expression of the variable symbol.
Definition at line 270 of file MCSymbol.h.
References assert(), isVariable(), MCExpr, and Value.
Referenced by llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::MachObjectWriter::findAliasedSymbol(), llvm::MCResourceInfo::gatherResourceInfo(), getFragment(), llvm::MachObjectWriter::getSymbolAddress(), getSymbolOffsetImpl(), llvm::AMDGPUMCExpr::isSymbolUsedInExpression(), knownBitsMapHelper(), and llvm::AMDGPUMCInstLower::lowerOperand().
◆ isAbsolute()
| bool llvm::MCSymbol::isAbsolute ( ) const | inline |
|---|
◆ isCommon()
| bool llvm::MCSymbol::isCommon ( ) const | inline |
|---|
◆ isDefined()
| bool llvm::MCSymbol::isDefined ( ) const | inline |
|---|
isDefined - Check if this symbol is defined (i.e., it has an address).
Defined symbols are either absolute or in some section.
Definition at line 233 of file MCSymbol.h.
References isUndefined().
Referenced by llvm::DwarfCompileUnit::attachLowHighPC(), llvm::EHStreamer::computePadMap(), llvm::AsmPrinter::emitFunctionBody(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::MCSymbolELF::getBinding(), llvm::MCContext::getCOFFSection(), isInSymtab(), llvm::MCParserUtils::parseAssignmentExpression(), and llvm::AddrLabelMap::UpdateForDeletedBlock().
◆ isInSection()
| bool llvm::MCSymbol::isInSection ( ) const | inline |
|---|
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute).
Definition at line 237 of file MCSymbol.h.
References AbsolutePseudoFragment, F, and getFragment().
Referenced by llvm::LoongArchAsmBackend::addReloc(), llvm::BTFDebug::beginFunctionImpl(), llvm::MCStreamer::endSection(), llvm::ELFObjectWriter::executePostLayoutBinding(), llvm::MachObjectWriter::getAtom(), llvm::MCContext::getCOFFSection(), getSection(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::ELFObjectWriter::useSectionSymbol(), and llvm::WinCOFFWriter::writeObject().
◆ isRedefinable()
| bool llvm::MCSymbol::isRedefinable ( ) const | inline |
|---|
◆ isRegistered()
| bool llvm::MCSymbol::isRegistered ( ) const | inline |
|---|
◆ isResolving()
| bool llvm::MCSymbol::isResolving ( ) const | inline |
|---|
◆ isTemporary()
| bool llvm::MCSymbol::isTemporary ( ) const | inline |
|---|
isTemporary - Check if this is an assembler temporary symbol.
Definition at line 205 of file MCSymbol.h.
References IsTemporary.
Referenced by llvm::MCWinCOFFStreamer::emitCGProfileEntry(), isInSymtab(), llvm::MCSymbolMachO::isSymbolLinkerVisible(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), MCSymbol(), llvm::MCSymbolCOFF::MCSymbolCOFF(), llvm::MCSymbolELF::MCSymbolELF(), llvm::MCSymbolMachO::MCSymbolMachO(), llvm::MCSymbolWasm::MCSymbolWasm(), llvm::MCSymbolXCOFF::MCSymbolXCOFF(), and llvm::WinCOFFWriter::writeObject().
◆ isUndefined()
| bool llvm::MCSymbol::isUndefined ( ) const | inline |
|---|
◆ isUsedInReloc()
| bool llvm::MCSymbol::isUsedInReloc ( ) const | inline |
|---|
◆ isVariable()
| bool llvm::MCSymbol::isVariable ( ) const | inline |
|---|
isVariable - Check if this is a variable symbol.
Definition at line 267 of file MCSymbol.h.
Referenced by attemptToFoldSymbolOffsetDifference(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::MCExpr::evaluateAsRelocatableImpl(), llvm::MachObjectWriter::findAliasedSymbol(), llvm::MCResourceInfo::gatherResourceInfo(), getFragment(), llvm::MachObjectWriter::getSymbolAddress(), getSymbolOffsetImpl(), getVariableValue(), llvm::AMDGPUMCExpr::isSymbolUsedInExpression(), knownBitsMapHelper(), llvm::MCParserUtils::parseAssignmentExpression(), and setFragment().
◆ isWeakExternal()
| bool llvm::MCSymbol::isWeakExternal ( ) const | inline |
|---|
◆ modifyFlags()
Modify the flags via a mask.
Definition at line 375 of file MCSymbol.h.
References assert(), Flags, NumFlagsBits, and Value.
Referenced by llvm::MCSymbolMachO::clearReferenceType(), llvm::MCSymbolMachO::setAltEntry(), llvm::MCSymbolCOFF::setClass(), llvm::MCSymbolMachO::setCold(), llvm::MCSymbolXCOFF::setEHInfo(), llvm::MCSymbolWasm::setExported(), llvm::MCSymbolCOFF::setIsSafeSEH(), llvm::MCSymbolGOFF::setLDAttributes(), llvm::MCSymbolMachO::setNoDeadStrip(), llvm::MCSymbolWasm::setNoStrip(), llvm::MCSymbolMachO::setReferenceTypeUndefinedLazy(), llvm::MCSymbolMachO::setSymbolResolver(), llvm::MCSymbolMachO::setThumbFunc(), llvm::MCSymbolWasm::setTLS(), llvm::MCSymbolMachO::setWeakDefinition(), llvm::MCSymbolCOFF::setWeakExternalCharacteristics(), and llvm::MCSymbolMachO::setWeakReference().
◆ operator new()
◆ operator=()
◆ print()
print - Print the value to the stream OS.
Definition at line 59 of file MCSymbol.cpp.
References llvm::CallingConv::C, getName(), llvm::MCAsmInfo::isValidUnquotedName(), llvm::report_fatal_error(), and llvm::MCAsmInfo::supportsNameQuoting().
Referenced by EmitInlineAsmStr(), llvm::operator<<(), llvm::M68kAsmPrinter::PrintAsmMemoryOperand(), llvm::CSKYAsmPrinter::PrintAsmOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), printExpr(), printExpr(), llvm::ARMAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), and llvm::AsmPrinter::PrintSymbolOperand().
◆ redefineIfPossible()
| void llvm::MCSymbol::redefineIfPossible ( ) | inline |
|---|
◆ setCommon()
| void llvm::MCSymbol::setCommon ( uint64_t Size, Align Alignment ) | inline |
|---|
◆ setFlags()
| void llvm::MCSymbol::setFlags ( uint32_t Value) const | inlineprotected |
|---|
Set the (implementation defined) symbol flags.
Definition at line 369 of file MCSymbol.h.
References assert(), Flags, NumFlagsBits, and Value.
Referenced by llvm::MCSymbolELF::setBinding(), llvm::MCSymbolMachO::setDesc(), llvm::MCSymbolELF::setIsSignature(), llvm::MCSymbolELF::setIsWeakref(), llvm::MCSymbolELF::setMemtag(), llvm::MCSymbolELF::setOther(), llvm::MCSymbolELF::setType(), and llvm::MCSymbolELF::setVisibility().
◆ setFragment()
| void llvm::MCSymbol::setFragment ( MCFragment * F) const | inline |
|---|
◆ setIndex()
| void llvm::MCSymbol::setIndex ( uint32_t Value) const | inline |
|---|
◆ setIsRegistered()
| void llvm::MCSymbol::setIsRegistered ( bool Value) const | inline |
|---|
◆ setIsResolving()
| void llvm::MCSymbol::setIsResolving ( bool V) | inline |
|---|
◆ setOffset()
| void llvm::MCSymbol::setOffset ( uint64_t Value) | inline |
|---|
◆ setRedefinable()
| void llvm::MCSymbol::setRedefinable ( bool Value) | inline |
|---|
◆ setUsedInReloc()
| void llvm::MCSymbol::setUsedInReloc ( ) const | inline |
|---|
◆ setVariableValue()
| void MCSymbol::setVariableValue | ( | const MCExpr * | Value | ) |
|---|
◆ MCContext
◆ MCExpr
◆ [union]
◆ AbsolutePseudoFragment
◆ CommonAlignLog2
| unsigned llvm::MCSymbol::CommonAlignLog2 | protected |
|---|
◆ CommonSize
◆ Flags
◆ Fragment
If a symbol has a Fragment, the section is implied, so we only need one pointer.
The special AbsolutePseudoFragment value is for absolute symbols. If this is a variable symbol, this caches the variable value's fragment. FIXME: We might be able to simplify this by having the asm streamer create dummy fragments. If this is a section, then it gives the symbol is defined in. This is null for undefined symbols.
If this is a fragment, then it gives the fragment this symbol's value is relative to, if any.
Definition at line 65 of file MCSymbol.h.
Referenced by llvm::MCExpr::findAssociatedFragment(), getFragment(), redefineIfPossible(), setFragment(), and setVariableValue().
◆ HasName
True if this symbol is named.
A named symbol will have a pointer to the name allocated in the bytes immediately prior to the MCSymbol.
Definition at line 73 of file MCSymbol.h.
Referenced by getName(), and MCSymbol().
◆ Index
◆ IsExternal
◆ IsPrivateExtern
| unsigned llvm::MCSymbol::IsPrivateExtern | mutableprotected |
|---|
◆ IsRedefinable
◆ IsRegistered
◆ IsResolving
◆ IsTemporary
◆ IsUsedInReloc
◆ IsWeakExternal
◆ kind
◆ Offset
◆ Value
If non-null, the value for a variable symbol.
Definition at line 130 of file MCSymbol.h.
Referenced by getVariableValue(), modifyFlags(), redefineIfPossible(), llvm::MCSymbolMachO::setDesc(), llvm::MCSymbolCOFF::setExternal(), llvm::MCSymbolMachO::setExternal(), llvm::MCSymbolWasm::setExternal(), llvm::MCSymbolXCOFF::setExternal(), setFlags(), setIndex(), setIsRegistered(), setOffset(), llvm::MCSymbolMachO::setPrivateExtern(), setRedefinable(), llvm::MCSymbolMachO::setReferenceTypeUndefinedLazy(), and setVariableValue().
The documentation for this class was generated from the following files:
- include/llvm/MC/MCSymbol.h
- lib/MC/MCSymbol.cpp