LLVM
13.0.0git
|
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"
Public Member Functions | |
MCSymbol (const MCSymbol &)=delete | |
MCSymbol & | operator= (const MCSymbol &)=delete |
StringRef | getName () const |
getName - Get the symbol name. More... | |
bool | isRegistered () const |
void | setIsRegistered (bool Value) const |
void | setUsedInReloc () const |
bool | isUsedInReloc () const |
uint32_t | getIndex () const |
Get the (implementation defined) index. More... | |
void | setIndex (uint32_t Value) const |
Set the (implementation defined) index. More... | |
bool | isUnset () const |
uint64_t | getOffset () const |
void | setOffset (uint64_t Value) |
uint64_t | getCommonSize () const |
Return the size of a 'common' symbol. More... | |
void | setCommon (uint64_t Size, unsigned Align, bool Target=false) |
Mark this symbol as being 'common'. More... | |
unsigned | getCommonAlignment () const |
Return the alignment of a 'common' symbol. More... | |
bool | declareCommon (uint64_t Size, unsigned Align, bool Target=false) |
Declare this symbol as being 'common'. More... | |
bool | isCommon () const |
Is this a 'common' symbol. More... | |
bool | isTargetCommon () const |
Is this a target-specific common-like symbol. More... | |
MCFragment * | getFragment (bool SetUsed=true) const |
bool | isExternal () const |
void | setExternal (bool Value) const |
bool | isPrivateExtern () const |
void | setPrivateExtern (bool Value) |
void | print (raw_ostream &OS, const MCAsmInfo *MAI) const |
print - Print the value to the stream OS . More... | |
void | dump () const |
dump - Print the value to stderr. More... | |
Accessors | |
bool | isTemporary () const |
isTemporary - Check if this is an assembler temporary symbol. More... | |
bool | isUsed () const |
isUsed - Check if this is used. More... | |
bool | isRedefinable () const |
Check if this symbol is redefinable. More... | |
void | setRedefinable (bool Value) |
Mark this symbol as redefinable. More... | |
void | redefineIfPossible () |
Prepare this symbol to be redefined. More... | |
Associated Sections | |
bool | isDefined () const |
isDefined - Check if this symbol is defined (i.e., it has an address). More... | |
bool | isInSection () const |
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute). More... | |
bool | isUndefined (bool SetUsed=true) const |
isUndefined - Check if this symbol undefined (i.e., implicitly defined). More... | |
bool | isAbsolute () const |
isAbsolute - Check if this is an absolute symbol. More... | |
MCSection & | getSection () const |
Get the section associated with a defined, non-absolute symbol. More... | |
void | setFragment (MCFragment *F) const |
Mark the symbol as defined in the fragment F . More... | |
void | setUndefined () |
Mark the symbol as undefined. More... | |
bool | isELF () const |
bool | isCOFF () const |
bool | isMachO () const |
bool | isWasm () const |
bool | isXCOFF () const |
Variable Symbols | |
bool | isVariable () const |
isVariable - Check if this is a variable symbol. More... | |
const MCExpr * | getVariableValue (bool SetUsed=true) const |
getVariableValue - Get the value for variable symbols. More... | |
void | setVariableValue (const MCExpr *Value) |
Protected Types | |
enum | SymbolKind { SymbolKindUnset, SymbolKindCOFF, SymbolKindELF, SymbolKindMachO, SymbolKindWasm, SymbolKindXCOFF } |
The kind of the symbol. More... | |
enum | Contents : uint8_t { SymContentsUnset, SymContentsOffset, SymContentsVariable, SymContentsCommon, SymContentsTargetCommon } |
A symbol can contain an Offset, or Value, or be Common, but never more than one of these. More... | |
enum | : unsigned { NumCommonAlignmentBits = 5 } |
The alignment of the symbol, if it is 'common', or -1. 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 = union { const StringMapEntry< bool > *NameEntry |
The name for a symbol. More... | |
Protected Member Functions | |
MCSymbol (SymbolKind Kind, const StringMapEntry< bool > *Name, bool isTemporary) | |
void * | operator new (size_t s, const StringMapEntry< bool > *Name, MCContext &Ctx) |
uint32_t | getFlags () const |
Get the (implementation defined) symbol flags. More... | |
void | setFlags (uint32_t Value) const |
Set the (implementation defined) symbol flags. More... | |
void | modifyFlags (uint32_t Value, uint32_t Mask) const |
Modify the flags via a mask. More... | |
Protected Attributes | |
PointerIntPair< MCFragment *, 1 > | FragmentAndHasName |
If a symbol has a Fragment, the section is implied, so we only need one pointer. More... | |
unsigned | IsTemporary: 1 |
IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table. More... | |
unsigned | IsRedefinable: 1 |
True if this symbol can be redefined. More... | |
unsigned | IsUsed: 1 |
IsUsed - True if this symbol has been used. More... | |
unsigned | IsRegistered: 1 |
unsigned | IsExternal: 1 |
True if this symbol is visible outside this translation unit. More... | |
unsigned | IsPrivateExtern: 1 |
This symbol is private extern. More... | |
unsigned | Kind: 3 |
LLVM RTTI discriminator. More... | |
unsigned | IsUsedInReloc: 1 |
True if we have created a relocation that uses this symbol. More... | |
unsigned | SymbolContents: 3 |
This is actually a Contents enumerator, but is unsigned to avoid sign extension and achieve better bitpacking with MSVC. More... | |
unsigned | CommonAlignLog2: NumCommonAlignmentBits |
uint32_t | Flags: NumFlagsBits |
uint32_t | Index = 0 |
Index field, for use by the object file implementation. More... | |
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... | |
}; | |
uint64_t | AlignmentPadding |
Static Protected Attributes | |
static MCFragment * | AbsolutePseudoFragment = &SentinelFragment |
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 41 of file MCSymbol.h.
|
protected |
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 151 of file MCSymbol.h.
|
protected |
The alignment of the symbol, if it is 'common', or -1.
The alignment is stored as log2(align) + 1. This allows all values from 0 to 2^31 to be stored which is every power of 2 representable by an unsigned.
Enumerator | |
---|---|
NumCommonAlignmentBits |
Definition at line 120 of file MCSymbol.h.
|
protected |
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 125 of file MCSymbol.h.
|
protected |
A symbol can contain an Offset, or Value, or be Common, but never more than one of these.
Enumerator | |
---|---|
SymContentsUnset | |
SymContentsOffset | |
SymContentsVariable | |
SymContentsCommon | |
SymContentsTargetCommon |
Definition at line 56 of file MCSymbol.h.
|
protected |
The kind of the symbol.
If it is any value other than unset then this class is actually one of the appropriate subclasses of MCSymbol.
Enumerator | |
---|---|
SymbolKindUnset | |
SymbolKindCOFF | |
SymbolKindELF | |
SymbolKindMachO | |
SymbolKindWasm | |
SymbolKindXCOFF |
Definition at line 45 of file MCSymbol.h.
|
inlineprotected |
Definition at line 155 of file MCSymbol.h.
References FragmentAndHasName, and Offset.
|
inline |
Declare this symbol as being 'common'.
Size | - The size of the symbol. |
Align | - The alignment of the symbol. |
Target | - Is the symbol a target-specific common-like symbol. |
Definition at line 367 of file MCSymbol.h.
References assert(), CommonSize, getCommonAlignment(), getOffset(), isCommon(), isTargetCommon(), setCommon(), and llvm::Check::Size.
Referenced by llvm::AMDGPUTargetELFStreamer::emitAMDGPULDS().
LLVM_DUMP_METHOD void MCSymbol::dump | ( | ) | const |
dump - Print the value to stderr.
Definition at line 85 of file MCSymbol.cpp.
References llvm::dbgs().
|
inline |
Return the alignment of a 'common' symbol.
Definition at line 356 of file MCSymbol.h.
References assert(), CommonAlignLog2, and isCommon().
Referenced by declareCommon(), and llvm::MCSymbolMachO::getEncodedFlags().
|
inline |
Return the size of a 'common' symbol.
Definition at line 332 of file MCSymbol.h.
References assert(), CommonSize, and isCommon().
|
inlineprotected |
Get the (implementation defined) symbol flags.
Definition at line 412 of file MCSymbol.h.
References Flags.
Referenced by llvm::MCSymbolCOFF::getClass(), llvm::MCSymbolMachO::getEncodedFlags(), llvm::MCSymbolMachO::isAltEntry(), llvm::MCSymbolELF::isBindingSet(), llvm::MCSymbolMachO::isCold(), llvm::MCSymbolWasm::isExported(), llvm::MCSymbolMachO::isNoDeadStrip(), llvm::MCSymbolWasm::isNoStrip(), llvm::MCSymbolCOFF::isSafeSEH(), llvm::MCSymbolELF::isSignature(), llvm::MCSymbolMachO::isSymbolResolver(), llvm::MCSymbolMachO::isWeakDefinition(), llvm::MCSymbolCOFF::isWeakExternal(), llvm::MCSymbolMachO::isWeakReference(), llvm::MCSymbolELF::isWeakrefUsedInReloc(), llvm::MCSymbolELF::setBinding(), llvm::MCSymbolELF::setIsSignature(), llvm::MCSymbolELF::setIsWeakrefUsedInReloc(), llvm::MCSymbolELF::setOther(), llvm::MCSymbolELF::setType(), and llvm::MCSymbolELF::setVisibility().
|
inline |
Definition at line 389 of file MCSymbol.h.
References llvm::MCExpr::findAssociatedFragment(), FragmentAndHasName, getVariableValue(), and isVariable().
Referenced by llvm::MCExpr::findAssociatedFragment(), getOffsetAndDataFragment(), llvm::RISCVMCExpr::getPCRelHiFixup(), getSection(), isAbsolute(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolved(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), and isUndefined().
|
inline |
Get the (implementation defined) index.
Definition at line 306 of file MCSymbol.h.
References Index.
|
inline |
getName - Get the symbol name.
Definition at line 197 of file MCSymbol.h.
References FragmentAndHasName.
Referenced by llvm::MipsTargetAsmStreamer::emitDirectiveCpsetup(), llvm::WebAssemblyTargetAsmStreamer::emitEventType(), llvm::WebAssemblyTargetAsmStreamer::emitExportName(), llvm::MipsAsmPrinter::emitFunctionBodyEnd(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::WebAssemblyTargetAsmStreamer::emitFunctionType(), llvm::WebAssemblyTargetAsmStreamer::emitGlobalType(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::WebAssemblyTargetAsmStreamer::emitImportModule(), llvm::TargetLoweringObjectFileELF::emitPersonalityValue(), llvm::WebAssemblyTargetAsmStreamer::emitTableType(), EvaluateCRExpr(), llvm::RecordStreamer::flushSymverDirectives(), llvm::MCContext::getAssociativeCOFFSection(), llvm::MCAsmLayout::getBaseSymbol(), llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol(), llvm::MCContext::getCOFFSection(), llvm::MCContext::getELFSection(), llvm::MCSymbolMachO::getEncodedFlags(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::MCSymbolWasm::getImportName(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), getStaticStructorSection(), llvm::MCSymbolXCOFF::getUnqualifiedName(), llvm::MCContext::getWasmSection(), hasGOTReference(), llvm::MCExpr::print(), llvm::X86Operand::print(), llvm::DIELabel::print(), llvm::DIEDelta::print(), print(), llvm::MipsAsmPrinter::printOperand(), llvm::NVPTXInstPrinter::printProtoIdent(), llvm::MCSectionWasm::PrintSwitchToSection(), llvm::MCSectionELF::PrintSwitchToSection(), llvm::PPCInstPrinter::printTLSCall(), llvm::MCContext::registerInlineAsmLabel(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), smallData(), llvm::stableHashValue(), and transformCallee().
|
inline |
Definition at line 317 of file MCSymbol.h.
References assert(), Offset, SymbolContents, SymContentsOffset, and SymContentsUnset.
Referenced by declareCommon(), getOffsetAndDataFragment(), llvm::RISCVMCExpr::getPCRelHiFixup(), and setCommon().
|
inline |
Get the section associated with a defined, non-absolute symbol.
Definition at line 261 of file MCSymbol.h.
References assert(), getFragment(), llvm::MCFragment::getParent(), and isInSection().
Referenced by llvm::DwarfCompileUnit::addRange(), llvm::BTFDebug::beginFunctionImpl(), emitRangeList(), llvm::CodeViewContext::encodeInlineLineTable(), llvm::MCSectionELF::getLinkedToSection(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), and llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl().
getVariableValue - Get the value for variable symbols.
Definition at line 295 of file MCSymbol.h.
References assert(), IsUsed, isVariable(), and Value.
Referenced by canExpand(), llvm::MCExpr::evaluateAsRelocatableImpl(), getFragment(), and llvm::MCParserUtils::parseAssignmentExpression().
|
inline |
isAbsolute - Check if this is an absolute symbol.
Definition at line 256 of file MCSymbol.h.
References AbsolutePseudoFragment, and getFragment().
Referenced by isInSection().
|
inline |
Definition at line 277 of file MCSymbol.h.
References Kind, and SymbolKindCOFF.
|
inline |
Is this a 'common' symbol.
Definition at line 379 of file MCSymbol.h.
References SymbolContents, SymContentsCommon, and SymContentsTargetCommon.
Referenced by declareCommon(), llvm::MCAsmLayout::getBaseSymbol(), getCommonAlignment(), getCommonSize(), and llvm::MCSymbolMachO::getEncodedFlags().
|
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 242 of file MCSymbol.h.
References isUndefined().
Referenced by llvm::AsmPrinter::emitFunctionBody(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::MCSymbolELF::getBinding(), getOffsetAndDataFragment(), isInSection(), isInSymtab(), and llvm::MachineFunction::tidyLandingPads().
|
inline |
Definition at line 275 of file MCSymbol.h.
References Kind, and SymbolKindELF.
Referenced by llvm::ARMAsmBackend::shouldForceRelocation().
|
inline |
Definition at line 398 of file MCSymbol.h.
References IsExternal.
Referenced by llvm::ARMAsmBackend::shouldForceRelocation().
|
inline |
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute).
Definition at line 246 of file MCSymbol.h.
References isAbsolute(), and isDefined().
Referenced by llvm::BTFDebug::beginFunctionImpl(), canExpand(), llvm::MCStreamer::endSection(), getSection(), llvm::MCSection::hasEnded(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), and llvm::MCStreamer::SwitchSection().
|
inline |
Definition at line 279 of file MCSymbol.h.
References Kind, and SymbolKindMachO.
|
inline |
Definition at line 401 of file MCSymbol.h.
References IsPrivateExtern.
|
inline |
Check if this symbol is redefinable.
Definition at line 220 of file MCSymbol.h.
References IsRedefinable.
|
inline |
Definition at line 204 of file MCSymbol.h.
References IsRegistered.
|
inline |
Is this a target-specific common-like symbol.
Definition at line 385 of file MCSymbol.h.
References SymbolContents, and SymContentsTargetCommon.
Referenced by declareCommon().
|
inline |
isTemporary - Check if this is an assembler temporary symbol.
Definition at line 214 of file MCSymbol.h.
References IsTemporary.
Referenced by llvm::MCWinCOFFStreamer::emitCGProfileEntry(), isInSymtab(), and llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl().
|
inline |
isUndefined - Check if this symbol undefined (i.e., implicitly defined).
Definition at line 251 of file MCSymbol.h.
References getFragment().
Referenced by llvm::AsmPrinter::emitConstantPool(), llvm::RISCVAsmBackend::evaluateTargetFixup(), isDefined(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolved(), llvm::MCParserUtils::parseAssignmentExpression(), and smallData().
|
inline |
Definition at line 315 of file MCSymbol.h.
References SymbolContents, and SymContentsUnset.
|
inline |
isUsed - Check if this is used.
Definition at line 217 of file MCSymbol.h.
References IsUsed.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
|
inline |
Definition at line 208 of file MCSymbol.h.
References IsUsedInReloc.
Referenced by llvm::MCSymbolELF::getBinding(), and isInSymtab().
|
inline |
isVariable - Check if this is a variable symbol.
Definition at line 290 of file MCSymbol.h.
References SymbolContents, and SymContentsVariable.
Referenced by llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitGlobalVariable(), llvm::MCExpr::evaluateAsRelocatableImpl(), getFragment(), getOffsetAndDataFragment(), getVariableValue(), llvm::MCParserUtils::parseAssignmentExpression(), and setFragment().
|
inline |
Definition at line 281 of file MCSymbol.h.
References Kind, and SymbolKindWasm.
|
inline |
Definition at line 283 of file MCSymbol.h.
References Kind, and SymbolKindXCOFF.
Modify the flags via a mask.
Definition at line 421 of file MCSymbol.h.
References assert(), Flags, llvm::BitmaskEnumDetail::Mask(), and NumFlagsBits.
Referenced by llvm::MCSymbolMachO::clearReferenceType(), llvm::MCSymbolMachO::setAltEntry(), llvm::MCSymbolCOFF::setClass(), llvm::MCSymbolMachO::setCold(), llvm::MCSymbolWasm::setExported(), llvm::MCSymbolCOFF::setIsSafeSEH(), llvm::MCSymbolCOFF::setIsWeakExternal(), llvm::MCSymbolMachO::setNoDeadStrip(), llvm::MCSymbolWasm::setNoStrip(), llvm::MCSymbolMachO::setReferenceTypeUndefinedLazy(), llvm::MCSymbolMachO::setSymbolResolver(), llvm::MCSymbolMachO::setThumbFunc(), llvm::MCSymbolMachO::setWeakDefinition(), and llvm::MCSymbolMachO::setWeakReference().
|
protected |
Definition at line 31 of file MCSymbol.cpp.
References s, and llvm::Check::Size.
void MCSymbol::print | ( | raw_ostream & | OS, |
const MCAsmInfo * | MAI | ||
) | const |
print - Print the value to the stream OS
.
Definition at line 59 of file MCSymbol.cpp.
References getName(), llvm::MCAsmInfo::isValidUnquotedName(), llvm::report_fatal_error(), and llvm::MCAsmInfo::supportsNameQuoting().
Referenced by EmitGCCInlineAsmStr(), llvm::operator<<(), llvm::MCExpr::print(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), printExpr(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::MCSectionCOFF::PrintSwitchToSection(), llvm::ARMAsmPrinter::PrintSymbolOperand(), and llvm::AsmPrinter::PrintSymbolOperand().
|
inline |
Prepare this symbol to be redefined.
Definition at line 224 of file MCSymbol.h.
References IsRedefinable, setUndefined(), SymbolContents, SymContentsUnset, and SymContentsVariable.
Referenced by llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), and llvm::AsmPrinter::emitGlobalVariable().
|
inline |
Mark this symbol as being 'common'.
Size | - The size of the symbol. |
Align | - The alignment of the symbol. |
Target | - Is the symbol a target-specific common-like symbol. |
Definition at line 342 of file MCSymbol.h.
References assert(), CommonAlignLog2, CommonSize, getOffset(), llvm::isPowerOf2_32(), llvm::Log2_32(), NumCommonAlignmentBits, llvm::Check::Size, SymbolContents, SymContentsCommon, and SymContentsTargetCommon.
Referenced by declareCommon().
|
inline |
Definition at line 399 of file MCSymbol.h.
References IsExternal, and Value.
Referenced by llvm::AMDGPUTargetELFStreamer::emitAMDGPULDS().
|
inlineprotected |
Set the (implementation defined) symbol flags.
Definition at line 415 of file MCSymbol.h.
References assert(), Flags, NumFlagsBits, and Value.
Referenced by llvm::MCSymbolELF::setBinding(), llvm::MCSymbolMachO::setDesc(), llvm::MCSymbolELF::setIsSignature(), llvm::MCSymbolELF::setIsWeakrefUsedInReloc(), llvm::MCSymbolELF::setOther(), llvm::MCSymbolELF::setType(), and llvm::MCSymbolELF::setVisibility().
|
inline |
Mark the symbol as defined in the fragment F
.
Definition at line 267 of file MCSymbol.h.
References assert(), F, FragmentAndHasName, and isVariable().
|
inline |
Set the (implementation defined) index.
Definition at line 311 of file MCSymbol.h.
Referenced by llvm::AMDGPUTargetELFStreamer::emitAMDGPULDS().
|
inline |
Definition at line 205 of file MCSymbol.h.
References IsRegistered, and Value.
|
inline |
Definition at line 323 of file MCSymbol.h.
References assert(), Offset, SymbolContents, SymContentsOffset, SymContentsUnset, and Value.
|
inline |
Definition at line 402 of file MCSymbol.h.
References IsPrivateExtern, and Value.
|
inline |
Mark this symbol as redefinable.
Definition at line 222 of file MCSymbol.h.
References IsRedefinable, and Value.
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
|
inline |
Mark the symbol as undefined.
Definition at line 273 of file MCSymbol.h.
References FragmentAndHasName.
Referenced by llvm::WebAssembly::getOrCreateFunctionTableSymbol(), redefineIfPossible(), and setVariableValue().
|
inline |
Definition at line 207 of file MCSymbol.h.
References IsUsedInReloc.
Definition at line 48 of file MCSymbol.cpp.
References assert(), IsUsed, setUndefined(), SymbolContents, SymContentsUnset, SymContentsVariable, and Value.
Referenced by llvm::MCWasmStreamer::emitWeakReference(), and llvm::MCELFStreamer::emitWeakReference().
|
friend |
Definition at line 144 of file MCSymbol.h.
|
friend |
Definition at line 143 of file MCSymbol.h.
union { ... } |
|
staticprotected |
Definition at line 65 of file MCSymbol.h.
Referenced by llvm::MCExpr::findAssociatedFragment(), and isAbsolute().
|
protected |
Definition at line 152 of file MCSymbol.h.
|
protected |
Definition at line 121 of file MCSymbol.h.
Referenced by getCommonAlignment(), and setCommon().
uint64_t llvm::MCSymbol::CommonSize |
The size of the symbol, if it is 'common'.
Definition at line 136 of file MCSymbol.h.
Referenced by declareCommon(), getCommonSize(), and setCommon().
|
mutableprotected |
Definition at line 126 of file MCSymbol.h.
Referenced by llvm::MCSymbolELF::getBinding(), llvm::MCSymbolMachO::getEncodedFlags(), getFlags(), llvm::MCSymbolELF::getOther(), llvm::MCSymbolELF::getType(), llvm::MCSymbolELF::getVisibility(), modifyFlags(), and setFlags().
|
mutableprotected |
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.
For the 'HasName' integer, this is 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 82 of file MCSymbol.h.
Referenced by getFragment(), getName(), MCSymbol(), setFragment(), and setUndefined().
|
mutableprotected |
Index field, for use by the object file implementation.
Definition at line 129 of file MCSymbol.h.
Referenced by getIndex(), and setIndex().
|
mutableprotected |
True if this symbol is visible outside this translation unit.
Note: ELF uses binding instead of this bit.
Definition at line 99 of file MCSymbol.h.
Referenced by isExternal(), and setExternal().
|
mutableprotected |
This symbol is private extern.
Definition at line 102 of file MCSymbol.h.
Referenced by isPrivateExtern(), and setPrivateExtern().
|
protected |
True if this symbol can be redefined.
Definition at line 90 of file MCSymbol.h.
Referenced by isRedefinable(), redefineIfPossible(), and setRedefinable().
|
mutableprotected |
Definition at line 95 of file MCSymbol.h.
Referenced by isRegistered(), and setIsRegistered().
|
protected |
IsTemporary - True if this is an assembler temporary label, which typically does not survive in the .o file's symbol table.
Usually "Lfoo" or ".foo".
Definition at line 87 of file MCSymbol.h.
Referenced by isTemporary().
|
mutableprotected |
IsUsed - True if this symbol has been used.
Definition at line 93 of file MCSymbol.h.
Referenced by getVariableValue(), isUsed(), and setVariableValue().
|
mutableprotected |
True if we have created a relocation that uses this symbol.
Definition at line 109 of file MCSymbol.h.
Referenced by isUsedInReloc(), and setUsedInReloc().
|
protected |
uint64_t llvm::MCSymbol::Offset |
The offset to apply to the fragment address to form this symbol's value.
Definition at line 133 of file MCSymbol.h.
Referenced by getOffset(), MCSymbol(), and setOffset().
|
protected |
This is actually a Contents enumerator, but is unsigned to avoid sign extension and achieve better bitpacking with MSVC.
Definition at line 113 of file MCSymbol.h.
Referenced by getOffset(), isCommon(), isTargetCommon(), isUnset(), isVariable(), redefineIfPossible(), setCommon(), setOffset(), and setVariableValue().
If non-null, the value for a variable symbol.
Definition at line 139 of file MCSymbol.h.
Referenced by getVariableValue(), setExternal(), setFlags(), setIndex(), setIsRegistered(), setOffset(), setPrivateExtern(), setRedefinable(), and setVariableValue().