LLVM  16.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MCSectionELF Class Referencefinal

This represents a section on linux, lots of unix variants and some bare metal systems. More...

#include "llvm/MC/MCSectionELF.h"

Inheritance diagram for llvm::MCSectionELF:
Inheritance graph
Collaboration diagram for llvm::MCSectionELF:
Collaboration graph

Public Member Functions

bool shouldOmitSectionDirective (StringRef Name, const MCAsmInfo &MAI) const
 Decides whether a '.section' directive should be printed before the section name. More...
unsigned getType () const
unsigned getFlags () const
unsigned getEntrySize () const
void setFlags (unsigned F)
const MCSymbolELFgetGroup () const
bool isComdat () const
void printSwitchToSection (const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, const MCExpr *Subsection) const override
bool useCodeAlign () const override
 Return true if a .align directive should use "optimized nops" to fill instead of 0s. More...
bool isVirtualSection () const override
 Check whether this section is "virtual", that is has no actual object file contents. More...
StringRef getVirtualSectionKind () const override
bool isUnique () const
unsigned getUniqueID () const
const MCSectiongetLinkedToSection () const
const MCSymbolgetLinkedToSymbol () const
- Public Member Functions inherited from llvm::MCSection
 MCSection (const MCSection &)=delete
MCSectionoperator= (const MCSection &)=delete
StringRef getName () const
SectionKind getKind () const
SectionVariant getVariant () const
MCSymbolgetBeginSymbol ()
const MCSymbolgetBeginSymbol () const
void setBeginSymbol (MCSymbol *Sym)
MCSymbolgetEndSymbol (MCContext &Ctx)
bool hasEnded () const
Align getAlign () const
void setAlignment (Align Value)
void ensureMinAlignment (Align MinAlignment)
 Makes sure that Alignment is at least MinAlignment. More...
unsigned getOrdinal () const
void setOrdinal (unsigned Value)
unsigned getLayoutOrder () const
void setLayoutOrder (unsigned Value)
BundleLockStateType getBundleLockState () const
void setBundleLockState (BundleLockStateType NewState)
bool isBundleLocked () const
bool isBundleGroupBeforeFirstInst () const
void setBundleGroupBeforeFirstInst (bool IsFirst)
bool hasInstructions () const
void setHasInstructions (bool Value)
bool isRegistered () const
void setIsRegistered (bool Value)
MCSection::FragmentListTypegetFragmentList ()
const MCSection::FragmentListTypegetFragmentList () const
const MCDummyFragmentgetDummyFragment () const
MCDummyFragmentgetDummyFragment ()
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
MCSection::iterator getSubsectionInsertionPoint (unsigned Subsection)
void dump () const
void addPendingLabel (MCSymbol *label, unsigned Subsection=0)
 Add a pending label for the requested subsection. More...
void flushPendingLabels (MCFragment *F, uint64_t FOffset=0, unsigned Subsection=0)
 Associate all pending labels in a subsection with a fragment. More...
void flushPendingLabels ()
 Associate all pending labels with empty data fragments. More...

Static Public Member Functions

static bool classof (const MCSection *S)
- Static Public Member Functions inherited from llvm::MCSection
static FragmentListType MCSection::* getSublistAccess (MCFragment *)
 Support for MCFragment::getNextNode(). More...


class MCContext

Additional Inherited Members

- Public Types inherited from llvm::MCSection
enum  SectionVariant {
  SV_Wasm, SV_XCOFF, SV_SPIRV, SV_DXContainer
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 Attributes inherited from llvm::MCSection
static constexpr unsigned NonUniqueID = ~0U
- Protected Member Functions inherited from llvm::MCSection
 MCSection (SectionVariant V, StringRef Name, SectionKind K, MCSymbol *Begin)
 ~MCSection ()
- Protected Attributes inherited from llvm::MCSection
StringRef Name
SectionVariant Variant
SectionKind Kind

Detailed Description

This represents a section on linux, lots of unix variants and some bare metal systems.

Definition at line 26 of file MCSectionELF.h.

Member Function Documentation

◆ classof()

static bool llvm::MCSectionELF::classof ( const MCSection S)

Definition at line 94 of file MCSectionELF.h.

References S, and llvm::MCSection::SV_ELF.

◆ getEntrySize()

unsigned llvm::MCSectionELF::getEntrySize ( ) const

Definition at line 74 of file MCSectionELF.h.

◆ getFlags()

unsigned llvm::MCSectionELF::getFlags ( ) const

Definition at line 73 of file MCSectionELF.h.

Referenced by useCodeAlign().

◆ getGroup()

const MCSymbolELF* llvm::MCSectionELF::getGroup ( ) const

◆ getLinkedToSection()

const MCSection* llvm::MCSectionELF::getLinkedToSection ( ) const

Definition at line 89 of file MCSectionELF.h.

References llvm::MCSymbol::getSection().

◆ getLinkedToSymbol()

const MCSymbol* llvm::MCSectionELF::getLinkedToSymbol ( ) const

Definition at line 92 of file MCSectionELF.h.

◆ getType()

unsigned llvm::MCSectionELF::getType ( ) const

Definition at line 72 of file MCSectionELF.h.

References Type.

Referenced by isVirtualSection().

◆ getUniqueID()

unsigned llvm::MCSectionELF::getUniqueID ( ) const

◆ getVirtualSectionKind()

StringRef MCSectionELF::getVirtualSectionKind ( ) const

Reimplemented from llvm::MCSection.

Definition at line 216 of file MCSectionELF.cpp.

◆ isComdat()

bool llvm::MCSectionELF::isComdat ( ) const

◆ isUnique()

bool llvm::MCSectionELF::isUnique ( ) const

Definition at line 86 of file MCSectionELF.h.

References llvm::MCSection::NonUniqueID.

Referenced by printSwitchToSection(), and shouldOmitSectionDirective().

◆ isVirtualSection()

bool MCSectionELF::isVirtualSection ( ) const

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

Implements llvm::MCSection.

Definition at line 212 of file MCSectionELF.cpp.

References getType(), and llvm::ELF::SHT_NOBITS.

◆ printSwitchToSection()

void MCSectionELF::printSwitchToSection ( const MCAsmInfo MAI,
const Triple T,
raw_ostream OS,
const MCExpr Subsection 
) const

◆ setFlags()

void llvm::MCSectionELF::setFlags ( unsigned  F)

Definition at line 75 of file MCSectionELF.h.

References F.

◆ shouldOmitSectionDirective()

bool MCSectionELF::shouldOmitSectionDirective ( StringRef  Name,
const MCAsmInfo MAI 
) const

Decides whether a '.section' directive should be printed before the section name.

Definition at line 22 of file MCSectionELF.cpp.

References isUnique(), llvm::MCSection::Name, and llvm::MCAsmInfo::shouldOmitSectionDirective().

Referenced by printSwitchToSection().

◆ useCodeAlign()

bool MCSectionELF::useCodeAlign ( ) const

Return true if a .align directive should use "optimized nops" to fill instead of 0s.

Implements llvm::MCSection.

Definition at line 208 of file MCSectionELF.cpp.

References getFlags(), and llvm::ELF::SHF_EXECINSTR.

Friends And Related Function Documentation

◆ MCContext

friend class MCContext

Definition at line 49 of file MCSectionELF.h.

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