class MCSectionMachO

Declaration

class MCSectionMachO : public MCSection { /* full declaration omitted */ };

Description

This represents a section on a Mach-O system (used by Mac OS X). On a Mac system, these are also described in /usr/include/mach-o/loader.h.

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:24

Inherits from: MCSection

Member Variables

private char[16] SegmentName
private unsigned int TypeAndAttributes
This is the SECTION_TYPE and SECTION_ATTRIBUTES field of a section, drawn from the enums below.
private unsigned int Reserved2
The 'reserved2' field of a section, used to represent the size of stubs, for example.

Inherited from MCSection:

protected Name
protected Variant
protected Kind
public static NonUniqueID = ~0U

Method Overview

  • private MCSectionMachO(llvm::StringRef Segment, llvm::StringRef Section, unsigned int TAA, unsigned int reserved2, llvm::SectionKind K, llvm::MCSymbol * Begin)
  • public static llvm::Error ParseSectionSpecifier(llvm::StringRef Spec, llvm::StringRef & Segment, llvm::StringRef & Section, unsigned int & TAA, bool & TAAParsed, unsigned int & StubSize)
  • public static bool classof(const llvm::MCSection * S)
  • public llvm::StringRef getSegmentName() const
  • public unsigned int getStubSize() const
  • public MachO::SectionType getType() const
  • public unsigned int getTypeAndAttributes() const
  • public bool hasAttribute(unsigned int Value) const
  • public bool isVirtualSection() const
  • public void printSwitchToSection(const llvm::MCAsmInfo & MAI, const llvm::Triple & T, llvm::raw_ostream & OS, const llvm::MCExpr * Subsection) const
  • public bool useCodeAlign() const

Inherited from MCSection:

Methods

MCSectionMachO(llvm::StringRef Segment,
               llvm::StringRef Section,
               unsigned int TAA,
               unsigned int reserved2,
               llvm::SectionKind K,
               llvm::MCSymbol* Begin)

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:35

Parameters

llvm::StringRef Segment
llvm::StringRef Section
unsigned int TAA
unsigned int reserved2
llvm::SectionKind K
llvm::MCSymbol* Begin

static llvm::Error ParseSectionSpecifier(
    llvm::StringRef Spec,
    llvm::StringRef& Segment,
    llvm::StringRef& Section,
    unsigned int& TAA,
    bool& TAAParsed,
    unsigned int& StubSize)

Description

Parse the section specifier indicated by "Spec". This is a string that can appear after a .section directive in a mach-o flavored .s file. If successful, this fills in the specified Out parameters and returns an empty string. When an invalid section specifier is present, this returns an Error indicating the problem. If no TAA was parsed, TAA is not altered, and TAAWasSet becomes false.

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:64

Parameters

llvm::StringRef Spec
llvm::StringRef& Segment
llvm::StringRef& Section
unsigned int& TAA
bool& TAAParsed
unsigned int& StubSize

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

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:77

Parameters

const llvm::MCSection* S

llvm::StringRef getSegmentName() const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:40

unsigned int getStubSize() const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:48

MachO::SectionType getType() const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:50

unsigned int getTypeAndAttributes() const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:47

bool hasAttribute(unsigned int Value) const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:54

Parameters

unsigned int Value

bool isVirtualSection() const

Description

Check whether this section is "virtual", that is has no actual object file contents.

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:75

void printSwitchToSection(
    const llvm::MCAsmInfo& MAI,
    const llvm::Triple& T,
    llvm::raw_ostream& OS,
    const llvm::MCExpr* Subsection) const

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:71

Parameters

const llvm::MCAsmInfo& MAI
const llvm::Triple& T
llvm::raw_ostream& OS
const llvm::MCExpr* Subsection

bool useCodeAlign() const

Description

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

Declared at: llvm/include/llvm/MC/MCSectionMachO.h:74