LLVM  3.7.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::MCSection Class Referenceabstract

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

#include <MCSection.h>

Inheritance diagram for llvm::MCSection:
[legend]
Collaboration diagram for llvm::MCSection:
[legend]

Public Types

enum  SectionVariant { SV_COFF = 0, SV_ELF, SV_MachO }
 
enum  BundleLockStateType { NotBundleLocked, BundleLocked, BundleLockedAlignToEnd }
 Express the state of bundle locked groups while emitting code. More...
 
typedef iplist< MCFragmentFragmentListType
 
typedef
FragmentListType::const_iterator 
const_iterator
 
typedef FragmentListType::iterator iterator
 
typedef
FragmentListType::const_reverse_iterator 
const_reverse_iterator
 
typedef
FragmentListType::reverse_iterator 
reverse_iterator
 

Public Member Functions

virtual ~MCSection ()
 
SectionKind getKind () const
 
SectionVariant getVariant () const
 
MCSymbolgetBeginSymbol ()
 
const MCSymbolgetBeginSymbol () const
 
void setBeginSymbol (MCSymbol *Sym)
 
MCSymbolgetEndSymbol (MCContext &Ctx)
 
bool hasEnded () const
 
unsigned getAlignment () const
 
void setAlignment (unsigned Value)
 
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
 
MCSection::iterator begin ()
 
MCSection::const_iterator begin () const
 
MCSection::iterator end ()
 
MCSection::const_iterator end () const
 
MCSection::reverse_iterator rbegin ()
 
MCSection::const_reverse_iterator rbegin () const
 
MCSection::reverse_iterator rend ()
 
MCSection::const_reverse_iterator rend () const
 
MCSection::iterator getSubsectionInsertionPoint (unsigned Subsection)
 
void dump ()
 
virtual void PrintSwitchToSection (const MCAsmInfo &MAI, raw_ostream &OS, const MCExpr *Subsection) const =0
 
virtual bool UseCodeAlign () const =0
 Return true if a .align directive should use "optimized nops" to fill instead of 0s. More...
 
virtual bool isVirtualSection () const =0
 Check whether this section is "virtual", that is has no actual object file contents. More...
 

Protected Member Functions

 MCSection (SectionVariant V, SectionKind K, MCSymbol *Begin)
 

Protected Attributes

SectionVariant Variant
 
SectionKind Kind
 

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

Member Typedef Documentation

Definition at line 61 of file MCSection.h.

Definition at line 64 of file MCSection.h.

Definition at line 59 of file MCSection.h.

Definition at line 62 of file MCSection.h.

Definition at line 65 of file MCSection.h.

Member Enumeration Documentation

Express the state of bundle locked groups while emitting code.

Enumerator
NotBundleLocked 
BundleLocked 
BundleLockedAlignToEnd 

Definition at line 53 of file MCSection.h.

Enumerator
SV_COFF 
SV_ELF 
SV_MachO 

Definition at line 50 of file MCSection.h.

Constructor & Destructor Documentation

MCSection::MCSection ( SectionVariant  V,
SectionKind  K,
MCSymbol Begin 
)
protected

Definition at line 22 of file MCSection.cpp.

MCSection::~MCSection ( )
virtual

Definition at line 34 of file MCSection.cpp.

Member Function Documentation

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

Definition at line 156 of file MCSection.h.

References begin().

void MCSection::dump ( )

Definition at line 89 of file MCSection.cpp.

References begin(), end(), and llvm::errs().

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

Definition at line 161 of file MCSection.h.

References end().

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

Definition at line 114 of file MCSection.h.

References getBeginSymbol().

BundleLockStateType llvm::MCSection::getBundleLockState ( ) const
inline

Definition at line 133 of file MCSection.h.

Referenced by llvm::MCELFStreamer::EmitBundleUnlock().

MCSymbol * MCSection::getEndSymbol ( MCContext Ctx)

Definition at line 26 of file MCSection.cpp.

References llvm::MCContext::createTempSymbol().

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

MCSection::FragmentListType& llvm::MCSection::getFragmentList ( )
inline
const MCSection::FragmentListType& llvm::MCSection::getFragmentList ( ) const
inline

Definition at line 151 of file MCSection.h.

References getFragmentList().

SectionKind llvm::MCSection::getKind ( ) const
inline

Definition at line 109 of file MCSection.h.

References Kind.

Referenced by llvm::MCContext::getAssociativeCOFFSection(), and llvm::MCSectionCOFF::UseCodeAlign().

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

Definition at line 130 of file MCSection.h.

Referenced by llvm::MachObjectWriter::getPaddingSize().

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

Definition at line 127 of file MCSection.h.

MCSection::iterator MCSection::getSubsectionInsertionPoint ( unsigned  Subsection)
SectionVariant llvm::MCSection::getVariant ( ) const
inline
bool MCSection::hasEnded ( ) const

Definition at line 32 of file MCSection.cpp.

References llvm::MCSymbol::isInSection().

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

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

Definition at line 137 of file MCSection.h.

Referenced by llvm::MCELFStreamer::EmitBundleUnlock().

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

Definition at line 135 of file MCSection.h.

References NotBundleLocked.

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

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

Definition at line 147 of file MCSection.h.

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

virtual bool llvm::MCSection::isVirtualSection ( ) const
pure virtual
virtual void llvm::MCSection::PrintSwitchToSection ( const MCAsmInfo MAI,
raw_ostream OS,
const MCExpr Subsection 
) const
pure virtual
MCSection::reverse_iterator MCSection::rbegin ( )

Definition at line 107 of file MCSection.cpp.

References llvm::iplist< NodeTy, Traits >::rbegin().

Referenced by rbegin().

MCSection::const_reverse_iterator llvm::MCSection::rbegin ( ) const
inline

Definition at line 166 of file MCSection.h.

References rbegin().

MCSection::reverse_iterator MCSection::rend ( )

Definition at line 109 of file MCSection.cpp.

References llvm::iplist< NodeTy, Traits >::rend().

Referenced by rend().

MCSection::const_reverse_iterator llvm::MCSection::rend ( ) const
inline

Definition at line 171 of file MCSection.h.

References rend().

void llvm::MCSection::setAlignment ( unsigned  Value)
inline
void llvm::MCSection::setBeginSymbol ( MCSymbol Sym)
inline

Definition at line 117 of file MCSection.h.

Referenced by llvm::MCELFStreamer::ChangeSection().

void llvm::MCSection::setBundleGroupBeforeFirstInst ( bool  IsFirst)
inline

Definition at line 140 of file MCSection.h.

Referenced by llvm::MCELFStreamer::EmitBundleLock().

void MCSection::setBundleLockState ( BundleLockStateType  NewState)
void llvm::MCSection::setHasInstructions ( bool  Value)
inline

Definition at line 145 of file MCSection.h.

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

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

Definition at line 148 of file MCSection.h.

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

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

Definition at line 131 of file MCSection.h.

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

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

Definition at line 128 of file MCSection.h.

virtual bool llvm::MCSection::UseCodeAlign ( ) const
pure virtual

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

Implemented in llvm::MCSectionELF, llvm::MCSectionMachO, llvm::MCSectionCOFF, and llvm::NVPTXSection.

Member Data Documentation

SectionKind llvm::MCSection::Kind
protected

Definition at line 104 of file MCSection.h.

Referenced by getKind().

SectionVariant llvm::MCSection::Variant
protected

Definition at line 103 of file MCSection.h.

Referenced by getVariant().


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