LLVM 19.0.0git
|
Instances of this class represent a uniqued identifier for a section in the current translation unit. More...
#include "llvm/MC/MCSection.h"
Classes | |
struct | FragList |
struct | iterator |
Public Types | |
enum | SectionVariant { SV_COFF = 0 , SV_ELF , SV_GOFF , SV_MachO , SV_Wasm , SV_XCOFF , SV_SPIRV , SV_DXContainer } |
enum | BundleLockStateType { NotBundleLocked , BundleLocked , BundleLockedAlignToEnd } |
Express the state of bundle locked groups while emitting code. More... | |
Public Attributes | |
friend | MCAssembler |
friend | MCObjectStreamer |
Static Public Attributes | |
static constexpr unsigned | NonUniqueID = ~0U |
Protected Member Functions | |
MCSection (SectionVariant V, StringRef Name, bool IsText, bool IsVirtual, MCSymbol *Begin) | |
~MCSection () | |
Protected Attributes | |
StringRef | Name |
SectionVariant | Variant |
Instances of this class represent a uniqued identifier for a section in the current translation unit.
The MCContext class uniques and creates these.
Definition at line 36 of file MCSection.h.
Express the state of bundle locked groups while emitting code.
Enumerator | |
---|---|
NotBundleLocked | |
BundleLocked | |
BundleLockedAlignToEnd |
Definition at line 54 of file MCSection.h.
Enumerator | |
---|---|
SV_COFF | |
SV_ELF | |
SV_GOFF | |
SV_MachO | |
SV_Wasm | |
SV_XCOFF | |
SV_SPIRV | |
SV_DXContainer |
Definition at line 42 of file MCSection.h.
|
protected |
Definition at line 23 of file MCSection.cpp.
References llvm::MCFragment::setParent().
|
protected |
Definition at line 41 of file MCSection.cpp.
|
inline |
Definition at line 201 of file MCSection.h.
References assert(), F, llvm::MCFragment::getLayoutOrder(), llvm::MCSection::FragList::Head, and llvm::MCSection::FragList::Tail.
Referenced by llvm::MCWinCOFFStreamer::emitCOFFSafeSEH().
Add a pending label for the requested subsection.
This label will be associated with a fragment in flushPendingLabels()
|
inline |
Definition at line 197 of file MCSection.h.
References llvm::MCSection::FragList::Head.
Referenced by EmitUnwindCode(), and llvm::MachObjectWriter::writeObject().
|
inline |
Definition at line 196 of file MCSection.h.
Referenced by llvm::MCSectionMachO::allocAtoms(), and llvm::MCAsmLayout::getSectionAddressSize().
LLVM_DUMP_METHOD void MCSection::dump | ( | ) | const |
Definition at line 72 of file MCSection.cpp.
References llvm::errs(), F, llvm::First, getName(), and OS.
|
inline |
Definition at line 199 of file MCSection.h.
References llvm::MCSection::FragList::Head.
Referenced by llvm::WebAssemblyAsmPrinter::EmitProducerInfo().
|
inline |
Definition at line 198 of file MCSection.h.
|
inline |
Makes sure that Alignment is at least MinAlignment.
Definition at line 162 of file MCSection.h.
Referenced by llvm::MCWinCOFFStreamer::emitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::emitCOFFSymbolIndex(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::MCObjectStreamer::emitValueToAlignment(), and llvm::MipsTargetELFStreamer::finish().
|
inline |
Definition at line 158 of file MCSection.h.
Referenced by addData(), getAlignment(), and llvm::MachObjectWriter::getPaddingSize().
|
inline |
Definition at line 147 of file MCSection.h.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), llvm::DwarfUnit::addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), llvm::DwarfUnit::addStringOffsetsStart(), llvm::DwarfCompileUnit::applyStmtList(), llvm::MCContext::createELFRelSection(), llvm::DwarfUnit::emitCommonHeader(), llvm::MCObjectFileInfo::getBBAddrMapSection(), getBeginSymbol(), llvm::MCObjectFileInfo::getKCFITrapSection(), llvm::MCObjectFileInfo::getPCSection(), llvm::MCObjectFileInfo::getPseudoProbeSection(), llvm::MCObjectFileInfo::getStackSizesSection(), llvm::DwarfCompileUnit::initStmtList(), llvm::MCDwarfLineStr::MCDwarfLineStr(), and llvm::LoongArchAsmBackend::shouldInsertFixupForCodeAlign().
Definition at line 148 of file MCSection.h.
References getBeginSymbol().
|
inline |
Definition at line 173 of file MCSection.h.
|
inline |
Definition at line 194 of file MCSection.h.
|
inline |
Definition at line 193 of file MCSection.h.
Definition at line 33 of file MCSection.cpp.
References llvm::MCContext::createTempSymbol().
|
inline |
Definition at line 170 of file MCSection.h.
Referenced by llvm::MachObjectWriter::getPaddingSize().
|
inline |
Definition at line 142 of file MCSection.h.
References Name.
Referenced by addData(), llvm::BTFDebug::beginFunctionImpl(), canGoAfterDWARF(), canUseLocalRelocation(), dump(), llvm::MCObjectStreamer::emitInstruction(), llvm::MCContext::getAssociativeCOFFSection(), llvm::MCObjectFileInfo::getPseudoProbeSection(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), isDwoSection(), llvm::MCAsmInfoDarwin::isSectionAtomizableBySymbols(), llvm::MCSectionCOFF::printSwitchToSection(), llvm::MCSectionELF::printSwitchToSection(), llvm::MCSectionMachO::printSwitchToSection(), llvm::MCSectionWasm::printSwitchToSection(), llvm::MCSectionXCOFF::printSwitchToSection(), llvm::MCSectionGOFF::printSwitchToSection(), and llvm::XtensaTargetELFStreamer::startLiteralSection().
|
inline |
Definition at line 167 of file MCSection.h.
|
inline |
Definition at line 145 of file MCSection.h.
References Variant.
Referenced by llvm::MCSectionCOFF::classof(), llvm::MCSectionELF::classof(), llvm::MCSectionGOFF::classof(), llvm::MCSectionMachO::classof(), llvm::MCSectionWasm::classof(), and llvm::MCSectionXCOFF::classof().
|
virtual |
Reimplemented in llvm::MCSectionCOFF, and llvm::MCSectionELF.
Definition at line 69 of file MCSection.cpp.
Referenced by llvm::MCObjectStreamer::emitInstruction().
bool MCSection::hasEnded | ( | ) | const |
Definition at line 39 of file MCSection.cpp.
References llvm::MCSymbol::isInSection().
|
inline |
Definition at line 184 of file MCSection.h.
Referenced by AttemptToFoldSymbolOffsetDifference(), and llvm::MCObjectStreamer::mayHaveInstructions().
|
inline |
Definition at line 187 of file MCSection.h.
|
inline |
Definition at line 177 of file MCSection.h.
Referenced by llvm::MCELFStreamer::emitBundleUnlock().
|
inline |
Definition at line 175 of file MCSection.h.
References NotBundleLocked.
|
inline |
Definition at line 190 of file MCSection.h.
Referenced by llvm::AArch64TargetStreamer::emitNoteSection().
|
inline |
Definition at line 143 of file MCSection.h.
Referenced by llvm::MCSectionXCOFF::printSwitchToSection(), and llvm::MCSectionCOFF::useCodeAlign().
|
inline |
Check whether this section is "virtual", that is has no actual object file contents.
Definition at line 225 of file MCSection.h.
Referenced by llvm::AsmPrinter::emitGlobalVariable(), llvm::MCObjectStreamer::emitInstruction(), llvm::MachObjectWriter::getPaddingSize(), llvm::MCAsmLayout::getSectionFileSize(), and llvm::MCAssembler::writeSectionData().
|
inline |
Definition at line 159 of file MCSection.h.
Referenced by llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::dwarf_linker::classic::DwarfStreamer::emitSwiftAST(), llvm::dwarf_linker::classic::DwarfStreamer::emitSwiftReflectionSection(), and llvm::XtensaTargetELFStreamer::startLiteralSection().
|
inline |
Definition at line 151 of file MCSection.h.
|
inline |
Definition at line 180 of file MCSection.h.
Referenced by llvm::MCELFStreamer::emitBundleLock().
void MCSection::setBundleLockState | ( | BundleLockStateType | NewState | ) |
Definition at line 50 of file MCSection.cpp.
References BundleLockedAlignToEnd, NotBundleLocked, and llvm::report_fatal_error().
Referenced by llvm::MCELFStreamer::emitBundleLock(), and llvm::MCELFStreamer::emitBundleUnlock().
|
inline |
Definition at line 185 of file MCSection.h.
|
inline |
Definition at line 188 of file MCSection.h.
Referenced by llvm::MCAssembler::layout().
|
inline |
Definition at line 191 of file MCSection.h.
|
inline |
Definition at line 171 of file MCSection.h.
Referenced by llvm::MCAssembler::layout().
|
inline |
Definition at line 168 of file MCSection.h.
Referenced by llvm::MCAssembler::layout().
|
pure virtual |
Return true if a .align directive should use "optimized nops" to fill instead of 0s.
Implemented in llvm::MCSectionCOFF, llvm::MCSectionDXContainer, llvm::MCSectionELF, llvm::MCSectionGOFF, llvm::MCSectionMachO, llvm::MCSectionSPIRV, llvm::MCSectionWasm, and llvm::MCSectionXCOFF.
Referenced by llvm::MCAssembler::computeFragmentSize().
friend llvm::MCSection::MCAssembler |
Definition at line 38 of file MCSection.h.
friend llvm::MCSection::MCObjectStreamer |
Definition at line 39 of file MCSection.h.
|
protected |
Definition at line 131 of file MCSection.h.
Referenced by getName(), llvm::MCSectionCOFF::isImplicitlyDiscardable(), llvm::MCSectionCOFF::shouldOmitSectionDirective(), llvm::MCSectionELF::shouldOmitSectionDirective(), and llvm::MCSectionWasm::shouldOmitSectionDirective().
|
staticconstexpr |
Definition at line 40 of file MCSection.h.
Referenced by llvm::MCContext::createELFGroupSection(), llvm::AsmPrinter::emitPatchableFunctionEntries(), llvm::AsmPrinter::emitXRayTable(), llvm::MCContext::getELFSection(), llvm::TargetLoweringObjectFileELF::getSectionForLSDA(), and llvm::MCSectionELF::isUnique().
|
protected |
Definition at line 132 of file MCSection.h.
Referenced by getVariant().