LLVM 20.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 177 of file MCSection.h.
References llvm::MCSection::FragList::Head.
Referenced by EmitUnwindCode(), and llvm::MachObjectWriter::writeObject().
|
inline |
Definition at line 176 of file MCSection.h.
Referenced by llvm::MCSectionMachO::allocAtoms(), and llvm::MCAssembler::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.
Referenced by llvm::MCAssembler::dump().
|
inline |
Definition at line 179 of file MCSection.h.
References llvm::MCSection::FragList::Head.
Referenced by llvm::WebAssemblyAsmPrinter::EmitProducerInfo().
|
inline |
Definition at line 178 of file MCSection.h.
|
inline |
Makes sure that Alignment is at least MinAlignment.
Definition at line 148 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 144 of file MCSection.h.
Referenced by addData(), getAlignment(), and llvm::MachObjectWriter::getPaddingSize().
|
inline |
Definition at line 133 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(), llvm::ELFObjectWriter::recordRelocation(), and llvm::LoongArchAsmBackend::shouldInsertFixupForCodeAlign().
Definition at line 134 of file MCSection.h.
References getBeginSymbol().
|
inline |
Definition at line 156 of file MCSection.h.
|
inline |
Definition at line 174 of file MCSection.h.
|
inline |
Definition at line 173 of file MCSection.h.
Definition at line 33 of file MCSection.cpp.
References llvm::MCContext::createTempSymbol().
|
inline |
Definition at line 128 of file MCSection.h.
References Name.
Referenced by addData(), llvm::BTFDebug::beginFunctionImpl(), 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(), llvm::XtensaTargetELFStreamer::startLiteralSection(), and llvm::WinCOFFWriter::writeObject().
|
inline |
Definition at line 153 of file MCSection.h.
|
inline |
Definition at line 131 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 167 of file MCSection.h.
Referenced by AttemptToFoldSymbolOffsetDifference(), and llvm::MCObjectStreamer::mayHaveInstructions().
|
inline |
Definition at line 160 of file MCSection.h.
Referenced by llvm::MCELFStreamer::emitBundleUnlock().
|
inline |
Definition at line 158 of file MCSection.h.
References NotBundleLocked.
|
inline |
Definition at line 170 of file MCSection.h.
Referenced by llvm::AArch64TargetStreamer::emitNoteSection().
|
inline |
Definition at line 129 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 193 of file MCSection.h.
Referenced by llvm::AsmPrinter::emitGlobalVariable(), llvm::MCObjectStreamer::emitInstruction(), llvm::MachObjectWriter::getPaddingSize(), llvm::MCAssembler::getSectionFileSize(), and llvm::MCAssembler::writeSectionData().
|
inline |
Definition at line 145 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 137 of file MCSection.h.
|
inline |
Definition at line 163 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 168 of file MCSection.h.
|
inline |
Definition at line 171 of file MCSection.h.
|
inline |
Definition at line 154 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 117 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 118 of file MCSection.h.
Referenced by getVariant().