LLVM 20.0.0git
|
#include "llvm/MC/MCFragment.h"
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 | |
MCFragment & | operator= (const MCFragment &)=delete |
void | destroy () |
Destroys the current fragment. | |
MCFragment * | getNext () const |
FragmentType | getKind () const |
MCSection * | getParent () const |
void | setParent (MCSection *Value) |
const MCSymbol * | getAtom () 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 |
Definition at line 32 of file MCFragment.h.
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.
|
protected |
Definition at line 27 of file MCFragment.cpp.
|
delete |
|
delete |
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 31 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().
LLVM_DUMP_METHOD void MCFragment::dump | ( | ) | const |
Definition at line 99 of file MCFragment.cpp.
References DF, llvm::errs(), F, 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, FT_SymbolId, getKind(), hasInstructions(), OS, and llvm::SmallVectorBase< Size_T >::size().
Definition at line 81 of file MCFragment.cpp.
Referenced by llvm::MachObjectWriter::getAtom(), and llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl().
|
inline |
Definition at line 97 of file MCFragment.h.
Referenced by dump(), and getOffsetAndDataFragment().
|
inline |
Definition at line 104 of file MCFragment.h.
Referenced by AttemptToFoldSymbolOffsetDifference(), and llvm::MCObjectStreamer::insert().
|
inline |
Definition at line 95 of file MCFragment.h.
Referenced by AttemptToFoldSymbolOffsetDifference().
|
inline |
Definition at line 99 of file MCFragment.h.
Referenced by AttemptToFoldSymbolOffsetDifference(), llvm::MCAssembler::computeFragmentSize(), llvm::RISCVAsmBackend::evaluateTargetFixup(), llvm::MachObjectWriter::getAtom(), llvm::MCStreamer::getCurrentFragment(), llvm::MCStreamer::getCurrentSectionOnly(), llvm::MachObjectWriter::getFragmentAddress(), llvm::MCSymbol::getSection(), llvm::MachObjectWriter::getSymbolAddress(), llvm::MCObjectStreamer::insert(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::WinCOFFWriter::recordRelocation(), llvm::ELFObjectWriter::recordRelocation(), llvm::WinCOFFObjectWriter::recordRelocation(), llvm::MCBoundaryAlignFragment::setLastFragment(), and llvm::LoongArchAsmBackend::shouldInsertFixupForCodeAlign().
|
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().
|
delete |
|
inline |
Definition at line 105 of file MCFragment.h.
|
inline |
Definition at line 100 of file MCFragment.h.
Referenced by llvm::MCSection::MCSection().
|
friend |
Definition at line 33 of file MCFragment.h.
|
friend |
Definition at line 34 of file MCFragment.h.
|
friend |
Definition at line 35 of file MCFragment.h.
|
protected |
Definition at line 76 of file MCFragment.h.
Referenced by llvm::MCEncodedFragment::alignToBundleEnd(), and llvm::MCEncodedFragment::setAlignToBundleEnd().
|
protected |
MCRelaxableFragment: x86-specific.
Definition at line 80 of file MCFragment.h.
Referenced by llvm::MCRelaxableFragment::getAllowAutoPadding(), and llvm::MCRelaxableFragment::setAllowAutoPadding().
|
protected |
Used by subclasses for better packing.
Definition at line 75 of file MCFragment.h.
Referenced by hasInstructions(), and llvm::MCEncodedFragment::setHasInstructions().
|
protected |
Definition at line 78 of file MCFragment.h.
Referenced by llvm::MCDataFragment::isLinkerRelaxable(), and llvm::MCDataFragment::setLinkerRelaxable().