class MCSection

Declaration

class MCSection { /* full declaration omitted */ };

Description

Instances of this class represent a uniqued identifier for a section in the current translation unit. The MCContext class uniques and creates these.

Declared at: llvm/include/llvm/MC/MCSection.h:39

Member Variables

private llvm::MCSymbol* Begin
private llvm::MCSymbol* End = nullptr
private llvm::Align Alignment
The alignment requirement of this section.
private unsigned int Ordinal = 0
The section index in the assemblers section list.
private unsigned int LayoutOrder
The index of this section in the layout order.
private llvm::MCSection::BundleLockStateType BundleLockState = NotBundleLocked
Keeping track of bundle-locked state.
private unsigned int BundleLockNestingDepth = 0
Current nesting depth of bundle_lock directives.
private bool BundleGroupBeforeFirstInst
We've seen a bundle_lock directive but not its first instruction yet.
private bool HasInstructions
Whether this section has had instructions emitted into it.
private bool IsRegistered
private llvm::MCDummyFragment DummyFragment
private llvm::MCSection::FragmentListType Fragments
private SmallVector<std::pair<unsigned int, MCFragment*>, 1> SubsectionFragmentMap
Mapping from subsection number to insertion point for subsection numbers below that number.
private SmallVector<llvm::MCSection::PendingLabel, 2> PendingLabels
protected llvm::StringRef Name
protected llvm::MCSection::SectionVariant Variant
protected llvm::SectionKind Kind
public static const unsigned int NonUniqueID = ~0U

Method Overview

Methods

MCSection(llvm::MCSection::SectionVariant V,
          llvm::StringRef Name,
          llvm::SectionKind K,
          llvm::MCSymbol* Begin)

Declared at: llvm/include/llvm/MC/MCSection.h:117

Parameters

llvm::MCSection::SectionVariant V
llvm::StringRef Name
llvm::SectionKind K
llvm::MCSymbol* Begin

MCSection(const llvm::MCSection&)

Declared at: llvm/include/llvm/MC/MCSection.h:121

Parameters

const llvm::MCSection&

void addPendingLabel(llvm::MCSymbol* label,
                     unsigned int Subsection = 0)

Description

Add a pending label for the requested subsection. This label will be associated with a fragment in flushPendingLabels()

Declared at: llvm/include/llvm/MC/MCSection.h:205

Parameters

llvm::MCSymbol* label
unsigned int Subsection = 0

llvm::MCSection::iterator begin()

Declared at: llvm/include/llvm/MC/MCSection.h:179

llvm::MCSection::const_iterator begin() const

Declared at: llvm/include/llvm/MC/MCSection.h:180

void dump() const

Declared at: llvm/include/llvm/MC/MCSection.h:187

llvm::MCSection::iterator end()

Declared at: llvm/include/llvm/MC/MCSection.h:182

llvm::MCSection::const_iterator end() const

Declared at: llvm/include/llvm/MC/MCSection.h:183

void flushPendingLabels(
    llvm::MCFragment* F,
    uint64_t FOffset = 0,
    unsigned int Subsection = 0)

Description

Associate all pending labels in a subsection with a fragment.

Declared at: llvm/include/llvm/MC/MCSection.h:208

Parameters

llvm::MCFragment* F
uint64_t FOffset = 0
unsigned int Subsection = 0

void flushPendingLabels()

Description

Associate all pending labels with empty data fragments. One fragment will be created for each subsection as necessary.

Declared at: llvm/include/llvm/MC/MCSection.h:213

unsigned int getAlignment() const

Declared at: llvm/include/llvm/MC/MCSection.h:140

llvm::MCSymbol* getBeginSymbol()

Declared at: llvm/include/llvm/MC/MCSection.h:129

const llvm::MCSymbol* getBeginSymbol() const

Declared at: llvm/include/llvm/MC/MCSection.h:130

llvm::MCSection::BundleLockStateType
getBundleLockState() const

Declared at: llvm/include/llvm/MC/MCSection.h:149

const llvm::MCDummyFragment& getDummyFragment()
    const

Declared at: llvm/include/llvm/MC/MCSection.h:176

llvm::MCDummyFragment& getDummyFragment()

Declared at: llvm/include/llvm/MC/MCSection.h:177

llvm::MCSymbol* getEndSymbol(llvm::MCContext& Ctx)

Declared at: llvm/include/llvm/MC/MCSection.h:137

Parameters

llvm::MCContext& Ctx

const MCSection::FragmentListType&
getFragmentList() const

Declared at: llvm/include/llvm/MC/MCSection.h:167

MCSection::FragmentListType& getFragmentList()

Declared at: llvm/include/llvm/MC/MCSection.h:166

llvm::SectionKind getKind() const

Declared at: llvm/include/llvm/MC/MCSection.h:125

unsigned int getLayoutOrder() const

Declared at: llvm/include/llvm/MC/MCSection.h:146

llvm::StringRef getName() const

Declared at: llvm/include/llvm/MC/MCSection.h:124

unsigned int getOrdinal() const

Declared at: llvm/include/llvm/MC/MCSection.h:143

static llvm::MCSection::FragmentListType
    llvm::MCSection::*
    getSublistAccess(llvm::MCFragment*)

Description

Support for MCFragment::getNextNode().

Declared at: llvm/include/llvm/MC/MCSection.h:172

Parameters

llvm::MCFragment*

MCSection::iterator getSubsectionInsertionPoint(
    unsigned int Subsection)

Declared at: llvm/include/llvm/MC/MCSection.h:185

Parameters

unsigned int Subsection

llvm::MCSection::SectionVariant getVariant() const

Declared at: llvm/include/llvm/MC/MCSection.h:127

virtual llvm::StringRef getVirtualSectionKind()
    const

Declared at: llvm/include/llvm/MC/MCSection.h:201

bool hasEnded() const

Declared at: llvm/include/llvm/MC/MCSection.h:138

bool hasInstructions() const

Declared at: llvm/include/llvm/MC/MCSection.h:160

bool isBundleGroupBeforeFirstInst() const

Declared at: llvm/include/llvm/MC/MCSection.h:153

bool isBundleLocked() const

Declared at: llvm/include/llvm/MC/MCSection.h:151

bool isRegistered() const

Declared at: llvm/include/llvm/MC/MCSection.h:163

virtual bool isVirtualSection() const

Description

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

Declared at: llvm/include/llvm/MC/MCSection.h:199

virtual void printSwitchToSection(
    const llvm::MCAsmInfo& MAI,
    const llvm::Triple& T,
    llvm::raw_ostream& OS,
    const llvm::MCExpr* Subsection) const

Declared at: llvm/include/llvm/MC/MCSection.h:189

Parameters

const llvm::MCAsmInfo& MAI
const llvm::Triple& T
llvm::raw_ostream& OS
const llvm::MCExpr* Subsection

void setAlignment(llvm::Align Value)

Declared at: llvm/include/llvm/MC/MCSection.h:141

Parameters

llvm::Align Value

void setBeginSymbol(llvm::MCSymbol* Sym)

Declared at: llvm/include/llvm/MC/MCSection.h:133

Parameters

llvm::MCSymbol* Sym

void setBundleGroupBeforeFirstInst(bool IsFirst)

Declared at: llvm/include/llvm/MC/MCSection.h:156

Parameters

bool IsFirst

void setBundleLockState(
    llvm::MCSection::BundleLockStateType NewState)

Declared at: llvm/include/llvm/MC/MCSection.h:150

Parameters

llvm::MCSection::BundleLockStateType NewState

void setHasInstructions(bool Value)

Declared at: llvm/include/llvm/MC/MCSection.h:161

Parameters

bool Value

void setIsRegistered(bool Value)

Declared at: llvm/include/llvm/MC/MCSection.h:164

Parameters

bool Value

void setLayoutOrder(unsigned int Value)

Declared at: llvm/include/llvm/MC/MCSection.h:147

Parameters

unsigned int Value

void setOrdinal(unsigned int Value)

Declared at: llvm/include/llvm/MC/MCSection.h:144

Parameters

unsigned int Value

virtual bool useCodeAlign() const

Description

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

Declared at: llvm/include/llvm/MC/MCSection.h:195

~MCSection()

Declared at: llvm/include/llvm/MC/MCSection.h:118