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

This represents a section on Windows. More...

#include "llvm/MC/MCSectionCOFF.h"

Inheritance diagram for llvm::MCSectionCOFF:
Inheritance graph

Public Member Functions

bool shouldOmitSectionDirective (StringRef Name, const MCAsmInfo &MAI) const
 Decides whether a '.section' directive should be printed before the section name.
unsigned getCharacteristics () const
MCSymbolgetCOMDATSymbol () const
int getSelection () const
void setSelection (int Selection) const
void printSwitchToSection (const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, uint32_t Subsection) const override
bool useCodeAlign () const override
 Return true if a .align directive should use "optimized nops" to fill instead of 0s.
StringRef getVirtualSectionKind () const override
unsigned getOrAssignWinCFISectionID (unsigned *NextID) const
- Public Member Functions inherited from llvm::MCSection
 MCSection (const MCSection &)=delete
MCSectionoperator= (const MCSection &)=delete
StringRef getName () const
bool isText () 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.
unsigned getOrdinal () const
void setOrdinal (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)
const MCDummyFragmentgetDummyFragment () const
MCDummyFragmentgetDummyFragment ()
FragListcurFragList () const
iterator begin () const
iterator end () const
bool empty () const
void dump () const
virtual void printSwitchToSection (const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, uint32_t Subsection) const =0
virtual bool useCodeAlign () const =0
 Return true if a .align directive should use "optimized nops" to fill instead of 0s.
bool isVirtualSection () const
 Check whether this section is "virtual", that is has no actual object file contents.
virtual StringRef getVirtualSectionKind () const

Static Public Member Functions

static bool isImplicitlyDiscardable (StringRef Name)
static bool classof (const MCSection *S)


class MCContext

Additional Inherited Members

- Public Types inherited from llvm::MCSection
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 inherited from llvm::MCSection
friend MCAssembler
friend MCObjectStreamer
- Static Public Attributes inherited from llvm::MCSection
static constexpr unsigned NonUniqueID = ~0U
- Protected Member Functions inherited from llvm::MCSection
 MCSection (SectionVariant V, StringRef Name, bool IsText, bool IsVirtual, MCSymbol *Begin)
 ~MCSection ()
- Protected Attributes inherited from llvm::MCSection
StringRef Name
SectionVariant Variant

Detailed Description

This represents a section on Windows.

Definition at line 27 of file MCSectionCOFF.h.

Member Function Documentation

◆ classof()

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

Definition at line 91 of file MCSectionCOFF.h.

References llvm::MCSection::getVariant(), and llvm::MCSection::SV_COFF.

◆ getCharacteristics()

unsigned llvm::MCSectionCOFF::getCharacteristics ( ) const

Definition at line 69 of file MCSectionCOFF.h.

References Characteristics.

Referenced by llvm::MCContext::getAssociativeCOFFSection(), and printSwitchToSection().

◆ getCOMDATSymbol()

MCSymbol * llvm::MCSectionCOFF::getCOMDATSymbol ( ) const

Definition at line 70 of file MCSectionCOFF.h.

Referenced by llvm::WinCOFFWriter::writeObject().

◆ getOrAssignWinCFISectionID()

unsigned llvm::MCSectionCOFF::getOrAssignWinCFISectionID ( unsigned NextID) const

Definition at line 81 of file MCSectionCOFF.h.

◆ getSelection()

int llvm::MCSectionCOFF::getSelection ( ) const

Definition at line 71 of file MCSectionCOFF.h.

References Selection.

◆ getVirtualSectionKind()

StringRef MCSectionCOFF::getVirtualSectionKind ( ) const

Reimplemented from llvm::MCSection.

Definition at line 111 of file MCSectionCOFF.cpp.

◆ isImplicitlyDiscardable()

static bool llvm::MCSectionCOFF::isImplicitlyDiscardable ( StringRef  Name)

Definition at line 87 of file MCSectionCOFF.h.

References llvm::MCSection::Name, and llvm::StringRef::starts_with().

Referenced by printSwitchToSection().

◆ printSwitchToSection()

void MCSectionCOFF::printSwitchToSection ( const MCAsmInfo MAI,
const Triple T,
raw_ostream OS,
uint32_t  Subsection 
) const

◆ setSelection()

void MCSectionCOFF::setSelection ( int  Selection) const

Definition at line 31 of file MCSectionCOFF.cpp.

References assert(), llvm::COFF::IMAGE_SCN_LNK_COMDAT, and Selection.

◆ shouldOmitSectionDirective()

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

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

Definition at line 19 of file MCSectionCOFF.cpp.

References llvm::MCSection::Name.

Referenced by printSwitchToSection().

◆ useCodeAlign()

bool MCSectionCOFF::useCodeAlign ( ) const

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

Implements llvm::MCSection.

Definition at line 109 of file MCSectionCOFF.cpp.

References llvm::MCSection::isText().

Friends And Related Function Documentation

◆ MCContext

friend class MCContext

Definition at line 51 of file MCSectionCOFF.h.

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