LLVM 20.0.0git
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::MCFragment Class Reference

#include "llvm/MC/MCFragment.h"

Inheritance diagram for llvm::MCFragment:
Inheritance graph
[legend]

Public Types

enum  FragmentType : uint8_t {
  FT_Align , FT_Data , FT_Fill , FT_Nops ,
  FT_Relaxable , FT_Org , FT_Dwarf , FT_DwarfFrame ,
  FT_LEB , FT_BoundaryAlign , FT_SymbolId , FT_CVInlineLines ,
  FT_CVDefRange , FT_PseudoProbe , FT_Dummy
}
 

Public Member Functions

 MCFragment ()=delete
 
 MCFragment (const MCFragment &)=delete
 
MCFragmentoperator= (const MCFragment &)=delete
 
void destroy ()
 Destroys the current fragment.
 
MCFragmentgetNext () const
 
FragmentType getKind () const
 
MCSectiongetParent () const
 
void setParent (MCSection *Value)
 
const MCSymbolgetAtom () const
 
unsigned getLayoutOrder () const
 
void setLayoutOrder (unsigned Value)
 
bool hasInstructions () const
 Does this fragment have instructions emitted into it? By default this is false, but specific fragment types may set it to true.
 
void dump () const
 

Protected Member Functions

 MCFragment (FragmentType Kind, bool HasInstructions)
 

Protected Attributes

bool HasInstructions: 1
 Used by subclasses for better packing.
 
bool AlignToBundleEnd: 1
 
bool LinkerRelaxable: 1
 MCDataFragment.
 
bool AllowAutoPadding: 1
 MCRelaxableFragment: x86-specific.
 

Friends

class MCAssembler
 
class MCObjectStreamer
 
class MCSection
 

Detailed Description

Definition at line 32 of file MCFragment.h.

Member Enumeration Documentation

◆ FragmentType

Enumerator
FT_Align 
FT_Data 
FT_Fill 
FT_Nops 
FT_Relaxable 
FT_Org 
FT_Dwarf 
FT_DwarfFrame 
FT_LEB 
FT_BoundaryAlign 
FT_SymbolId 
FT_CVInlineLines 
FT_CVDefRange 
FT_PseudoProbe 
FT_Dummy 

Definition at line 38 of file MCFragment.h.

Constructor & Destructor Documentation

◆ MCFragment() [1/3]

MCFragment::MCFragment ( FragmentType  Kind,
bool  HasInstructions 
)
protected

Definition at line 29 of file MCFragment.cpp.

◆ MCFragment() [2/3]

llvm::MCFragment::MCFragment ( )
delete

◆ MCFragment() [3/3]

llvm::MCFragment::MCFragment ( const MCFragment )
delete

Member Function Documentation

◆ destroy()

void MCFragment::destroy ( )

Destroys the current fragment.

This must be used instead of delete as MCFragment is non-virtual. This method will dispatch to the appropriate subclass.

Definition at line 33 of file MCFragment.cpp.

References FT_Align, FT_BoundaryAlign, FT_CVDefRange, FT_CVInlineLines, FT_Data, FT_Dummy, FT_Dwarf, FT_DwarfFrame, FT_Fill, FT_LEB, FT_Nops, FT_Org, FT_PseudoProbe, FT_Relaxable, and FT_SymbolId.

Referenced by llvm::CodeViewContext::~CodeViewContext().

◆ dump()

LLVM_DUMP_METHOD void MCFragment::dump ( ) const

◆ getAtom()

const MCSymbol * MCFragment::getAtom ( ) const

◆ getKind()

FragmentType llvm::MCFragment::getKind ( ) const
inline

Definition at line 97 of file MCFragment.h.

Referenced by dump(), and getOffsetAndDataFragment().

◆ getLayoutOrder()

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

◆ getNext()

MCFragment * llvm::MCFragment::getNext ( ) const
inline

Definition at line 95 of file MCFragment.h.

Referenced by AttemptToFoldSymbolOffsetDifference().

◆ getParent()

MCSection * llvm::MCFragment::getParent ( ) const
inline

◆ hasInstructions()

bool llvm::MCFragment::hasInstructions ( ) const
inline

Does this fragment have instructions emitted into it? By default this is false, but specific fragment types may set it to true.

Definition at line 109 of file MCFragment.h.

References HasInstructions.

Referenced by dump(), llvm::MCAssembler::layout(), and llvm::MCAssembler::writeFragmentPadding().

◆ operator=()

MCFragment & llvm::MCFragment::operator= ( const MCFragment )
delete

◆ setLayoutOrder()

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

Definition at line 105 of file MCFragment.h.

◆ setParent()

void llvm::MCFragment::setParent ( MCSection Value)
inline

Definition at line 100 of file MCFragment.h.

Referenced by llvm::MCSection::MCSection().

Friends And Related Function Documentation

◆ MCAssembler

friend class MCAssembler
friend

Definition at line 33 of file MCFragment.h.

◆ MCObjectStreamer

friend class MCObjectStreamer
friend

Definition at line 34 of file MCFragment.h.

◆ MCSection

friend class MCSection
friend

Definition at line 35 of file MCFragment.h.

Member Data Documentation

◆ AlignToBundleEnd

bool llvm::MCFragment::AlignToBundleEnd
protected

◆ AllowAutoPadding

bool llvm::MCFragment::AllowAutoPadding
protected

◆ HasInstructions

bool llvm::MCFragment::HasInstructions
protected

Used by subclasses for better packing.

MCEncodedFragment

Definition at line 75 of file MCFragment.h.

Referenced by hasInstructions(), and llvm::MCEncodedFragment::setHasInstructions().

◆ LinkerRelaxable

bool llvm::MCFragment::LinkerRelaxable
protected

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