LLVM 22.0.0git
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::MCSection Class Reference

Instances of this class represent a uniqued identifier for a section in the current translation unit. More...

#include "llvm/MC/MCSection.h"

Inheritance diagram for llvm::MCSection:
[フレーム]
[legend]

Classes

struct   FragList
struct   iterator

Public Member Functions

  MCSection (const MCSection &)=delete
void  setBeginSymbol (MCSymbol *Sym)
void  ensureMinAlignment (Align MinAlignment)
  Makes sure that Alignment is at least MinAlignment.
void  dump (DenseMap< const MCFragment *, SmallVector< const MCSymbol *, 0 > > *FragToSyms=nullptr) const
  Check whether this section is "virtual", that is has no actual object file contents.

Public Attributes

friend  MCAssembler
friend  MCObjectStreamer

Static Public Attributes

static constexpr unsigned  NonUniqueID = ~0U

Protected Member Functions

  MCSection (StringRef Name, bool IsText, bool IsBss, MCSymbol *Begin)

Protected Attributes

Friends

class  MCFragment

Detailed Description

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 521 of file MCSection.h.

Constructor & Destructor Documentation

◆  MCSection() [1/2]

MCSection::MCSection ( StringRef Name,
bool IsText,
bool IsBss,
MCSymbol * Begin )
protected

Definition at line 21 of file MCSection.cpp.

References Name.

Referenced by getBeginSymbol(), llvm::MCSectionELF::getLinkedToSection(), llvm::MCSectionCOFF::MCAsmInfoCOFF, llvm::MCSectionELF::MCAsmInfoELF, llvm::MCSectionWasm::MCAsmInfoWasm, llvm::MCSectionXCOFF::MCAsmInfoXCOFF, llvm::MCSectionDXContainer::MCContext, llvm::MCSectionSPIRV::MCContext, MCSection(), llvm::MCSectionGOFF::MCSymbolGOFF, and operator=().

◆  MCSection() [2/2]

llvm::MCSection::MCSection ( const MCSection & )
delete

References MCSection().

Member Function Documentation

◆  begin()

iterator llvm::MCSection::begin ( ) const
inline

Definition at line 629 of file MCSection.h.

◆  curFragList()

FragList * llvm::MCSection::curFragList ( ) const
inline

Definition at line 628 of file MCSection.h.

Referenced by llvm::MCSectionMachO::allocAtoms(), llvm::MCAssembler::getSectionAddressSize(), and llvm::MachObjectWriter::writeObject().

◆  dump()

LLVM_DUMP_METHOD void MCSection::dump ( DenseMap< const MCFragment *, SmallVector< const MCSymbol *, 0 > > * FragToSyms = nullptr ) const

Definition at line 36 of file MCSection.cpp.

References llvm::errs(), F, firstLinkerRelaxable(), getName(), isLinkerRelaxable(), LLVM_DUMP_METHOD, and MCFragment.

Referenced by llvm::MCAssembler::dump().

◆  end()

iterator llvm::MCSection::end ( ) const
inline

Definition at line 630 of file MCSection.h.

◆  ensureMinAlignment()

void llvm::MCSection::ensureMinAlignment ( Align MinAlignment )
inline

Makes sure that Alignment is at least MinAlignment.

Definition at line 608 of file MCSection.h.

Referenced by llvm::MCWinCOFFStreamer::emitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::emitCOFFSymbolIndex(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), and llvm::MipsTargetELFStreamer::finish().

◆  firstLinkerRelaxable()

unsigned llvm::MCSection::firstLinkerRelaxable ( ) const
inline

Definition at line 622 of file MCSection.h.

Referenced by dump().

◆  getAlign()

Align llvm::MCSection::getAlign ( ) const
inline

Definition at line 604 of file MCSection.h.

Referenced by addData(), getAlignment(), llvm::MachObjectWriter::getPaddingSize(), and llvm::MachObjectWriter::writeSection().

◆  getBeginSymbol() [1/2]

MCSymbol * llvm::MCSection::getBeginSymbol ( )
inline

Definition at line 593 of file MCSection.h.

Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), llvm::DwarfUnit::addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), llvm::DwarfUnit::addStringOffsetsStart(), llvm::DwarfCompileUnit::applyStmtList(), llvm::MCStreamer::changeSection(), llvm::MCContext::createELFRelSection(), llvm::DwarfUnit::emitCommonHeader(), llvm::MCObjectStreamer::emitRelocDirective(), llvm::ELFObjectWriter::executePostLayoutBinding(), llvm::MCObjectFileInfo::getBBAddrMapSection(), getBeginSymbol(), llvm::MCObjectFileInfo::getCallGraphSection(), llvm::MCObjectFileInfo::getKCFITrapSection(), llvm::MCObjectFileInfo::getPCSection(), llvm::MCObjectFileInfo::getPseudoProbeSection(), llvm::MCObjectFileInfo::getStackSizesSection(), llvm::DwarfCompileUnit::initStmtList(), llvm::MCDwarfLineStr::MCDwarfLineStr(), llvm::ELFObjectWriter::recordRelocation(), and llvm::LoongArchAsmBackend::relaxAlign().

◆  getBeginSymbol() [2/2]

const MCSymbol * llvm::MCSection::getBeginSymbol ( ) const
inline

Definition at line 594 of file MCSection.h.

References getBeginSymbol(), and MCSection().

◆  getDummyFragment()

MCFragment & llvm::MCSection::getDummyFragment ( )
inline

Definition at line 626 of file MCSection.h.

References MCFragment.

Referenced by llvm::MCStreamer::changeSection().

◆  getEndSymbol()

MCSymbol * MCSection::getEndSymbol ( MCContext & Ctx )

Definition at line 27 of file MCSection.cpp.

◆  getName()

StringRef llvm::MCSection::getName ( ) const
inline

Definition at line 590 of file MCSection.h.

References Name.

Referenced by addData(), llvm::BTFDebug::beginFunctionImpl(), canUseLocalRelocation(), dump(), llvm::MCContext::getAssociativeCOFFSection(), llvm::TargetLoweringObjectFileGOFF::getModuleMetadata(), isDwoSection(), llvm::MCAsmInfoDarwin::isSectionAtomizableBySymbols(), llvm::XtensaTargetELFStreamer::startLiteralSection(), llvm::WinCOFFWriter::writeObject(), and llvm::MachObjectWriter::writeSection().

◆  getOrdinal()

unsigned llvm::MCSection::getOrdinal ( ) const
inline

Definition at line 613 of file MCSection.h.

◆  hasEnded()

bool MCSection::hasEnded ( ) const

Definition at line 33 of file MCSection.cpp.

◆  hasInstructions()

bool llvm::MCSection::hasInstructions ( ) const
inline

Definition at line 616 of file MCSection.h.

Referenced by llvm::AMDGPUAsmPrinter::doFinalization(), and llvm::MCObjectStreamer::mayHaveInstructions().

◆  isBssSection()

bool llvm::MCSection::isBssSection ( ) const
inline

Check whether this section is "virtual", that is has no actual object file contents.

Definition at line 637 of file MCSection.h.

Referenced by llvm::AsmPrinter::emitGlobalVariable(), llvm::MachObjectWriter::getPaddingSize(), llvm::MCAssembler::getSectionFileSize(), llvm::MCSectionGOFF::getTextStyle(), llvm::MachObjectWriter::writeSection(), and llvm::MCAssembler::writeSectionData().

◆  isLinkerRelaxable()

bool llvm::MCSection::isLinkerRelaxable ( ) const
inline

Definition at line 623 of file MCSection.h.

Referenced by llvm::LoongArchAsmBackend::addReloc(), attemptToFoldSymbolOffsetDifference(), and dump().

◆  isRegistered()

bool llvm::MCSection::isRegistered ( ) const
inline

Definition at line 619 of file MCSection.h.

Referenced by llvm::AArch64TargetStreamer::emitNoteSection().

◆  isText()

bool llvm::MCSection::isText ( ) const
inline

Definition at line 591 of file MCSection.h.

Referenced by llvm::MCSectionWasm::MCAsmInfoWasm, llvm::MCSectionXCOFF::MCAsmInfoXCOFF, llvm::MCSectionDXContainer::MCContext, llvm::MCSectionGOFF::MCSymbolGOFF, and llvm::MCAsmInfoXCOFF::useCodeAlign().

◆  operator=()

MCSection & llvm::MCSection::operator= ( const MCSection & )
delete

References MCSection().

◆  setAlignment()

void llvm::MCSection::setAlignment ( Align Value )
inline

Definition at line 605 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().

◆  setBeginSymbol()

void llvm::MCSection::setBeginSymbol ( MCSymbol * Sym )
inline

Definition at line 597 of file MCSection.h.

References assert().

◆  setFirstLinkerRelaxable()

void llvm::MCSection::setFirstLinkerRelaxable ( unsigned Order )
inline

Definition at line 624 of file MCSection.h.

◆  setHasInstructions()

void llvm::MCSection::setHasInstructions ( bool Value )
inline

Definition at line 617 of file MCSection.h.

Referenced by llvm::MCObjectStreamer::emitInstruction().

◆  setIsRegistered()

void llvm::MCSection::setIsRegistered ( bool Value )
inline

Definition at line 620 of file MCSection.h.

◆  setOrdinal()

void llvm::MCSection::setOrdinal ( unsigned Value )
inline

Definition at line 614 of file MCSection.h.

Referenced by llvm::MCAssembler::layout().

◆  MCFragment

friend class MCFragment
friend

Definition at line 525 of file MCSection.h.

References MCFragment.

Referenced by dump(), getDummyFragment(), llvm::MCSection::iterator::iterator(), MCFragment, and llvm::MCSection::iterator::operator*().

Member Data Documentation

◆  MCAssembler

friend llvm::MCSection::MCAssembler

Definition at line 523 of file MCSection.h.

◆  MCObjectStreamer

friend llvm::MCSection::MCObjectStreamer

Definition at line 524 of file MCSection.h.

◆  Name

StringRef llvm::MCSection::Name
protected

Definition at line 582 of file MCSection.h.

Referenced by getName(), llvm::MCSectionCOFF::isImplicitlyDiscardable(), llvm::MCSectionCOFF::MCAsmInfoCOFF, llvm::MCSectionELF::MCAsmInfoELF, llvm::MCSectionWasm::MCAsmInfoWasm, llvm::MCSectionXCOFF::MCAsmInfoXCOFF, llvm::MCSectionDXContainer::MCContext, MCSection(), llvm::MCSectionGOFF::MCSymbolGOFF, llvm::MCSectionGOFF::setName(), and llvm::MCSectionCOFF::shouldOmitSectionDirective().

◆  NonUniqueID

unsigned llvm::MCSection::NonUniqueID = ~0U
staticconstexpr

Definition at line 526 of file MCSection.h.

Referenced by calcUniqueIDUpdateFlagsAndSize(), llvm::MCContext::createELFGroupSection(), llvm::AsmPrinter::emitPatchableFunctionEntries(), llvm::AsmPrinter::emitXRayTable(), llvm::MCContext::getAssociativeCOFFSection(), llvm::MCContext::getCOFFSection(), llvm::MCContext::getELFSection(), llvm::MCContext::getELFSection(), llvm::MCContext::getELFSection(), llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileELF::getSectionForLSDA(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), llvm::MCSectionCOFF::isUnique(), llvm::MCSectionELF::isUnique(), llvm::MCContext::recordELFMergeableSectionInfo(), selectELFSectionForGlobal(), llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal(), and selectWasmSectionForGlobal().


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

Generated on for LLVM by doxygen 1.14.0

AltStyle によって変換されたページ (->オリジナル) /