class TargetLoweringObjectFileMachO

Declaration

class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:97

Inherits from: TargetLoweringObjectFile

Method Overview

  • public void Initialize(llvm::MCContext & Ctx, const llvm::TargetMachine & TM)
  • public llvm::MCSection * SelectSectionForGlobal(const llvm::GlobalObject * GO, llvm::SectionKind Kind, const llvm::TargetMachine & TM) const
  • public TargetLoweringObjectFileMachO()
  • public void emitModuleMetadata(llvm::MCStreamer & Streamer, llvm::Module & M) const
  • public llvm::MCSymbol * getCFIPersonalitySymbol(const llvm::GlobalValue * GV, const llvm::TargetMachine & TM, llvm::MachineModuleInfo * MMI) const
  • public llvm::MCSection * getExplicitSectionGlobal(const llvm::GlobalObject * GO, llvm::SectionKind Kind, const llvm::TargetMachine & TM) const
  • public const llvm::MCExpr * getIndirectSymViaGOTPCRel(const llvm::GlobalValue * GV, const llvm::MCSymbol * Sym, const llvm::MCValue & MV, int64_t Offset, llvm::MachineModuleInfo * MMI, llvm::MCStreamer & Streamer) const
  • public void getNameWithPrefix(SmallVectorImpl<char> & OutName, const llvm::GlobalValue * GV, const llvm::TargetMachine & TM) const
  • public llvm::MCSection * getSectionForConstant(const llvm::DataLayout & DL, llvm::SectionKind Kind, const llvm::Constant * C, unsigned int & Align) const
  • public const llvm::MCExpr * getTTypeGlobalReference(const llvm::GlobalValue * GV, unsigned int Encoding, const llvm::TargetMachine & TM, llvm::MachineModuleInfo * MMI, llvm::MCStreamer & Streamer) const
  • public ~TargetLoweringObjectFileMachO()

Methods

void Initialize(llvm::MCContext& Ctx,
                const llvm::TargetMachine& TM)

Description

This method must be called before any actual lowering is done. This specifies the current context for codegen, and gives the lowering implementations a chance to set up their default sections.

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:102

Parameters

llvm::MCContext& Ctx
const llvm::TargetMachine& TM

llvm::MCSection* SelectSectionForGlobal(
    const llvm::GlobalObject* GO,
    llvm::SectionKind Kind,
    const llvm::TargetMachine& TM) const

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:107

Parameters

const llvm::GlobalObject* GO
llvm::SectionKind Kind
const llvm::TargetMachine& TM

TargetLoweringObjectFileMachO()

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:99

void emitModuleMetadata(
    llvm::MCStreamer& Streamer,
    llvm::Module& M) const

Description

Emit the module flags that specify the garbage collection information.

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:105

Parameters

llvm::MCStreamer& Streamer
llvm::Module& M

llvm::MCSymbol* getCFIPersonalitySymbol(
    const llvm::GlobalValue* GV,
    const llvm::TargetMachine& TM,
    llvm::MachineModuleInfo* MMI) const

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:125

Parameters

const llvm::GlobalValue* GV
const llvm::TargetMachine& TM
llvm::MachineModuleInfo* MMI

llvm::MCSection* getExplicitSectionGlobal(
    const llvm::GlobalObject* GO,
    llvm::SectionKind Kind,
    const llvm::TargetMachine& TM) const

Description

Targets should implement this method to assign a section to globals with an explicit section specfied. The implementation of this method can assume that GO->hasSection() is true.

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:110

Parameters

const llvm::GlobalObject* GO
llvm::SectionKind Kind
const llvm::TargetMachine& TM

const llvm::MCExpr* getIndirectSymViaGOTPCRel(
    const llvm::GlobalValue* GV,
    const llvm::MCSymbol* Sym,
    const llvm::MCValue& MV,
    int64_t Offset,
    llvm::MachineModuleInfo* MMI,
    llvm::MCStreamer& Streamer) const

Description

Get MachO PC relative GOT entry relocation

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:130

Parameters

const llvm::GlobalValue* GV
const llvm::MCSymbol* Sym
const llvm::MCValue& MV
int64_t Offset
llvm::MachineModuleInfo* MMI
llvm::MCStreamer& Streamer

void getNameWithPrefix(
    SmallVectorImpl<char>& OutName,
    const llvm::GlobalValue* GV,
    const llvm::TargetMachine& TM) const

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:136

Parameters

SmallVectorImpl<char>& OutName
const llvm::GlobalValue* GV
const llvm::TargetMachine& TM

llvm::MCSection* getSectionForConstant(
    const llvm::DataLayout& DL,
    llvm::SectionKind Kind,
    const llvm::Constant* C,
    unsigned int& Align) const

Description

Given a constant with the SectionKind, return a section that it should be placed in.

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:113

Parameters

const llvm::DataLayout& DL
llvm::SectionKind Kind
const llvm::Constant* C
unsigned int& Align

const llvm::MCExpr* getTTypeGlobalReference(
    const llvm::GlobalValue* GV,
    unsigned int Encoding,
    const llvm::TargetMachine& TM,
    llvm::MachineModuleInfo* MMI,
    llvm::MCStreamer& Streamer) const

Description

The mach-o version of this method defaults to returning a stub reference.

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:118

Parameters

const llvm::GlobalValue* GV
unsigned int Encoding
const llvm::TargetMachine& TM
llvm::MachineModuleInfo* MMI
llvm::MCStreamer& Streamer

~TargetLoweringObjectFileMachO()

Declared at: llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h:100