|
LLVM
10.0.0
|
Instances of this class represent a uniqued identifier for a section in the current translation unit. More...
#include "llvm/MC/MCSection.h"
Public Types | |
| enum | SectionVariant { SV_COFF = 0, SV_ELF, SV_MachO, SV_Wasm, SV_XCOFF } |
| enum | BundleLockStateType { NotBundleLocked, BundleLocked, BundleLockedAlignToEnd } |
| Express the state of bundle locked groups while emitting code. More... | |
| using | FragmentListType = iplist< MCFragment > |
| using | const_iterator = FragmentListType::const_iterator |
| using | iterator = FragmentListType::iterator |
| using | const_reverse_iterator = FragmentListType::const_reverse_iterator |
| using | reverse_iterator = FragmentListType::reverse_iterator |
Static Public Member Functions | |
| static FragmentListType MCSection::* | getSublistAccess (MCFragment *) |
| Support for MCFragment::getNextNode(). More... | |
Protected Member Functions | |
| MCSection (SectionVariant V, SectionKind K, MCSymbol *Begin) | |
| ~MCSection () | |
Protected Attributes | |
| SectionVariant | Variant |
| SectionKind | Kind |
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 39 of file MCSection.h.
Definition at line 52 of file MCSection.h.
Definition at line 55 of file MCSection.h.
Definition at line 50 of file MCSection.h.
Definition at line 53 of file MCSection.h.
Definition at line 56 of file MCSection.h.
Express the state of bundle locked groups while emitting code.
| Enumerator | |
|---|---|
| NotBundleLocked | |
| BundleLocked | |
| BundleLockedAlignToEnd | |
Definition at line 44 of file MCSection.h.
| Enumerator | |
|---|---|
| SV_COFF | |
| SV_ELF | |
| SV_MachO | |
| SV_Wasm | |
| SV_XCOFF | |
Definition at line 41 of file MCSection.h.
|
protected |
Definition at line 23 of file MCSection.cpp.
|
protecteddefault |
Referenced by hasEnded().
Add a pending label for the requested subsection.
This label will be associated with a fragment in flushPendingLabels()
Definition at line 88 of file MCSection.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::MCObjectStreamer::addPendingLabel(), and llvm::MCObjectStreamer::flushPendingLabels().
|
inline |
Definition at line 165 of file MCSection.h.
Referenced by dump(), llvm::MCContext::getWasmSection(), llvm::MCContext::getXCOFFSection(), and needPadding().
|
inline |
Definition at line 166 of file MCSection.h.
| LLVM_DUMP_METHOD void MCSection::dump | ( | ) | const |
Definition at line 124 of file MCSection.cpp.
References begin(), end(), and llvm::errs().
|
inline |
Definition at line 168 of file MCSection.h.
Referenced by dump(), getSubsectionInsertionPoint(), and needPadding().
|
inline |
Definition at line 169 of file MCSection.h.
References llvm::dump(), F(), and llvm::MachO::isVirtualSection().
| void MCSection::flushPendingLabels | ( | MCFragment * | F, |
| uint64_t | FOffset = 0, |
||
| unsigned | Subsection = 0 |
||
| ) |
Associate all pending labels in a subsection with a fragment.
Definition at line 92 of file MCSection.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and llvm::SmallVectorImpl< T >::erase().
Referenced by llvm::MCObjectStreamer::flushPendingLabels().
| void MCSection::flushPendingLabels | ( | ) |
Associate all pending labels with empty data fragments.
One fragment will be created for each subsection as necessary.
Definition at line 109 of file MCSection.cpp.
References llvm::SmallVectorBase::empty(), F(), getFragmentList(), getSubsectionInsertionPoint(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), and llvm::MCFragment::setParent().
|
inline |
Definition at line 126 of file MCSection.h.
References llvm::Align::value().
Referenced by addData(), canReuseBoundaryAlignFragment(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolIndex(), llvm::MCObjectStreamer::EmitValueToAlignment(), llvm::MipsTargetELFStreamer::finish(), getAlignment(), llvm::MachObjectWriter::getPaddingSize(), isIFunc(), and setSectionAlignmentForBundling().
|
inline |
Definition at line 115 of file MCSection.h.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), llvm::DwarfTypeUnit::addGlobalType(), llvm::DwarfCompileUnit::addScopeRangeList(), llvm::DwarfUnit::addStringOffsetsStart(), llvm::DwarfDebug::beginModule(), canGoAfterDWARF(), llvm::MCELFStreamer::ChangeSection(), llvm::MCWasmStreamer::ChangeSection(), computeIndexValue(), llvm::MCContext::createELFRelSection(), llvm::DwarfUnit::emitCommonHeader(), llvm::AsmPrinter::emitDwarfSymbolReference(), llvm::MCELFStreamer::EmitIdent(), llvm::DwarfDebug::endFunctionImpl(), llvm::MCObjectFileInfo::getStackSizesSection(), hasPrefix(), llvm::DwarfCompileUnit::initStmtList(), isIFunc(), llvm::MCDwarfLineStr::MCDwarfLineStr(), llvm::MCContext::renameELFSection(), and llvm::MCStreamer::SwitchSection().
Definition at line 116 of file MCSection.h.
|
inline |
Definition at line 135 of file MCSection.h.
Referenced by CheckBundleSubtargets(), and llvm::MCELFStreamer::EmitBundleUnlock().
|
inline |
Definition at line 162 of file MCSection.h.
Referenced by getPlatformName().
|
inline |
Definition at line 163 of file MCSection.h.
Definition at line 27 of file MCSection.cpp.
References llvm::MCContext::createTempSymbol().
Referenced by llvm::MCStreamer::endSection().
|
inline |
Definition at line 152 of file MCSection.h.
Referenced by flushPendingLabels(), llvm::MCAsmLayout::getSectionAddressSize(), getSubsectionInsertionPoint(), llvm::MCContext::getWasmSection(), llvm::MCContext::getXCOFFSection(), llvm::MCObjectStreamer::insert(), llvm::MCAssembler::layout(), llvm::MCFragment::MCFragment(), and needPadding().
|
inline |
Definition at line 153 of file MCSection.h.
|
inline |
Definition at line 111 of file MCSection.h.
Referenced by llvm::AsmPrinter::EmitAlignment(), llvm::MCContext::getAssociativeCOFFSection(), isDwarfSection(), llvm::MCSectionXCOFF::PrintSwitchToSection(), llvm::MCSectionXCOFF::UseCodeAlign(), and llvm::MCSectionCOFF::UseCodeAlign().
|
inline |
Definition at line 132 of file MCSection.h.
Referenced by llvm::MachObjectWriter::getPaddingSize().
|
inline |
Definition at line 129 of file MCSection.h.
Referenced by canUseLocalRelocation(), getARMFixupKindMachOInfo(), getFixupKindLog2Size(), and getFixupOffset().
|
inlinestatic |
Support for MCFragment::getNextNode().
Definition at line 158 of file MCSection.h.
| MCSection::iterator MCSection::getSubsectionInsertionPoint | ( | unsigned | Subsection | ) |
Definition at line 57 of file MCSection.cpp.
References end(), F(), getFragmentList(), llvm::iplist_impl< IntrusiveListT, TraitsT >::insert(), llvm::lower_bound(), MI, and llvm::MCFragment::setParent().
Referenced by llvm::MCObjectStreamer::changeSectionImpl(), and flushPendingLabels().
|
inline |
Definition at line 113 of file MCSection.h.
Referenced by llvm::MCSectionXCOFF::classof(), llvm::MCSectionMachO::classof(), llvm::MCSectionELF::classof(), llvm::MCSectionWasm::classof(), llvm::MCSectionCOFF::classof(), and getPlatformName().
| bool MCSection::hasEnded | ( | ) | const |
Definition at line 33 of file MCSection.cpp.
References llvm::MCSymbol::isInSection(), and ~MCSection().
Referenced by llvm::MCStreamer::SwitchSection().
|
inline |
Definition at line 146 of file MCSection.h.
Referenced by llvm::MCObjectStreamer::mayHaveInstructions(), and setSectionAlignmentForBundling().
|
inline |
Definition at line 139 of file MCSection.h.
Referenced by CheckBundleSubtargets(), and llvm::MCELFStreamer::EmitBundleUnlock().
|
inline |
Definition at line 137 of file MCSection.h.
Referenced by llvm::MCObjectStreamer::EmitInstruction(), hasVariantSymbol(), and llvm::MCELFStreamer::MCELFStreamer().
|
inline |
Definition at line 149 of file MCSection.h.
Referenced by isIFunc(), and llvm::MCAssembler::registerSection().
|
pure virtual |
Check whether this section is "virtual", that is has no actual object file contents.
Implemented in llvm::MCSectionMachO, llvm::MCSectionELF, llvm::MCSectionCOFF, llvm::MCSectionXCOFF, and llvm::MCSectionWasm.
Referenced by llvm::AsmPrinter::EmitGlobalVariable(), llvm::MachObjectWriter::getPaddingSize(), llvm::MCAsmLayout::getSectionFileSize(), and llvm::MCAssembler::writeSectionData().
|
pure virtual |
Implemented in llvm::MCSectionMachO, llvm::MCSectionELF, llvm::MCSectionCOFF, llvm::MCSectionXCOFF, and llvm::MCSectionWasm.
Referenced by llvm::NVPTXTargetStreamer::changeSection(), llvm::MCTargetStreamer::changeSection(), and truncateToSize().
|
inline |
Definition at line 127 of file MCSection.h.
Referenced by canReuseBoundaryAlignFragment(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCOFFSymbolIndex(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::MCObjectStreamer::EmitValueToAlignment(), llvm::MipsTargetELFStreamer::finish(), isIFunc(), and setSectionAlignmentForBundling().
|
inline |
Definition at line 119 of file MCSection.h.
References assert().
Referenced by canGoAfterDWARF(), and hasPrefix().
|
inline |
Definition at line 142 of file MCSection.h.
Referenced by CheckBundleSubtargets(), and llvm::MCELFStreamer::EmitBundleLock().
| void MCSection::setBundleLockState | ( | BundleLockStateType | NewState | ) |
Definition at line 37 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 147 of file MCSection.h.
Referenced by llvm::MCObjectStreamer::EmitInstruction().
|
inline |
Definition at line 150 of file MCSection.h.
Referenced by llvm::MCAssembler::registerSection().
|
inline |
Definition at line 133 of file MCSection.h.
Referenced by llvm::MCAssembler::layout().
|
inline |
Definition at line 130 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::MCSectionMachO, llvm::MCSectionELF, llvm::MCSectionCOFF, llvm::MCSectionXCOFF, and llvm::MCSectionWasm.
Referenced by llvm::MCAssembler::computeFragmentSize(), getPrefixes(), llvm::IsCPSRDead< MCInst >(), and parseHexOcta().
|
protected |
Definition at line 102 of file MCSection.h.
Referenced by llvm::MCSectionWasm::isWasmData().
|
protected |
Definition at line 101 of file MCSection.h.
1.8.13