class MCAsmLayout
Declaration
class MCAsmLayout { /* full declaration omitted */ };
Description
Encapsulates the layout of an assembly file at a particular point in time. Assembly may require computing multiple layouts for a particular assembly file as part of the relaxation process. This class encapsulates the layout at a single point in time in such a way that it is always possible to efficiently compute the exact address of any symbol in the assembly file, even during the relaxation process.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:28
Method Overview
- public MCAsmLayout(llvm::MCAssembler & Assembler)
- public llvm::MCAssembler & getAssembler() const
- public const llvm::MCSymbol * getBaseSymbol(const llvm::MCSymbol & Symbol) const
- public uint64_t getFragmentOffset(const llvm::MCFragment * F) const
- public uint64_t getSectionAddressSize(const llvm::MCSection * Sec) const
- public uint64_t getSectionFileSize(const llvm::MCSection * Sec) const
- public llvm::SmallVectorImpl<MCSection *> & getSectionOrder()
- public const llvm::SmallVectorImpl<MCSection *> & getSectionOrder() const
- public bool getSymbolOffset(const llvm::MCSymbol & S, uint64_t & Val) const
- public uint64_t getSymbolOffset(const llvm::MCSymbol & S) const
- public void invalidateFragmentsFrom(llvm::MCFragment * F)
- public void layoutFragment(llvm::MCFragment * Fragment)
Methods
¶MCAsmLayout(llvm::MCAssembler& Assembler)
MCAsmLayout(llvm::MCAssembler& Assembler)
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:47
Parameters
- llvm::MCAssembler& Assembler
¶llvm::MCAssembler& getAssembler() const
llvm::MCAssembler& getAssembler() const
Description
Get the assembler object this is a layout for.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:50
¶const llvm::MCSymbol* getBaseSymbol(
const llvm::MCSymbol& Symbol) const
const llvm::MCSymbol* getBaseSymbol(
const llvm::MCSymbol& Symbol) const
Description
If this symbol is equivalent to A + Constant, return A.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:99
Parameters
- const llvm::MCSymbol& Symbol
¶uint64_t getFragmentOffset(
const llvm::MCFragment* F) const
uint64_t getFragmentOffset(
const llvm::MCFragment* F) const
Description
Get the offset of the given fragment inside its containing section.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:75
Parameters
- const llvm::MCFragment* F
¶uint64_t getSectionAddressSize(
const llvm::MCSection* Sec) const
uint64_t getSectionAddressSize(
const llvm::MCSection* Sec) const
Description
Get the address space size of the given section, as it effects layout. This may differ from the size reported by
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:84
Parameters
- const llvm::MCSection* Sec
¶uint64_t getSectionFileSize(
const llvm::MCSection* Sec) const
uint64_t getSectionFileSize(
const llvm::MCSection* Sec) const
Description
Get the data size of the given section, as emitted to the object file. This may include additional padding, or be 0 for virtual sections.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:88
Parameters
- const llvm::MCSection* Sec
¶llvm::SmallVectorImpl<MCSection*>&
getSectionOrder()
llvm::SmallVectorImpl<MCSection*>&
getSectionOrder()
Description
@ {
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:65
¶const llvm::SmallVectorImpl<MCSection*>&
getSectionOrder() const
const llvm::SmallVectorImpl<MCSection*>&
getSectionOrder() const
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:66
¶bool getSymbolOffset(const llvm::MCSymbol& S,
uint64_t& Val) const
bool getSymbolOffset(const llvm::MCSymbol& S,
uint64_t& Val) const
Description
Get the offset of the given symbol, as computed in the current layout.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:93
Parameters
- const llvm::MCSymbol& S
- uint64_t& Val
Returns
True on success.
¶uint64_t getSymbolOffset(
const llvm::MCSymbol& S) const
uint64_t getSymbolOffset(
const llvm::MCSymbol& S) const
Description
Variant that reports a fatal error if the offset is not computable.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:96
Parameters
- const llvm::MCSymbol& S
¶void invalidateFragmentsFrom(llvm::MCFragment* F)
void invalidateFragmentsFrom(llvm::MCFragment* F)
Description
Invalidate the fragments starting with F because it has been resized. The fragment's size should have already been updated, but its bundle padding will be recomputed.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:55
Parameters
¶void layoutFragment(llvm::MCFragment* Fragment)
void layoutFragment(llvm::MCFragment* Fragment)
Description
Perform layout for a single fragment, assuming that the previous fragment has already been laid out correctly, and the parent section has been initialized.
Declared at: llvm/include/llvm/MC/MCAsmLayout.h:60
Parameters
- llvm::MCFragment* Fragment