LLVM  8.0.1
Public Member Functions | List of all members
llvm::TargetLoweringObjectFileMachO Class Reference

#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"

Inheritance diagram for llvm::TargetLoweringObjectFileMachO:
Inheritance graph
[legend]
Collaboration diagram for llvm::TargetLoweringObjectFileMachO:
Collaboration graph
[legend]

Public Member Functions

 TargetLoweringObjectFileMachO ()
 
 ~TargetLoweringObjectFileMachO () override=default
 
void Initialize (MCContext &Ctx, const TargetMachine &TM) override
 This method must be called before any actual lowering is done. More...
 
void emitModuleMetadata (MCStreamer &Streamer, Module &M) const override
 Emit the module flags that specify the garbage collection information. More...
 
MCSectionSelectSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
 
MCSectiongetExplicitSectionGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
 Targets should implement this method to assign a section to globals with an explicit section specfied. More...
 
MCSectiongetSectionForConstant (const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const override
 Given a constant with the SectionKind, return a section that it should be placed in. More...
 
const MCExprgetTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 The mach-o version of this method defaults to returning a stub reference. More...
 
MCSymbolgetCFIPersonalitySymbol (const GlobalValue *GV, const TargetMachine &TM, MachineModuleInfo *MMI) const override
 
const MCExprgetIndirectSymViaGOTPCRel (const MCSymbol *Sym, const MCValue &MV, int64_t Offset, MachineModuleInfo *MMI, MCStreamer &Streamer) const override
 Get MachO PC relative GOT entry relocation. More...
 
void getNameWithPrefix (SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const override
 
- Public Member Functions inherited from llvm::TargetLoweringObjectFile
 TargetLoweringObjectFile ()=default
 
 TargetLoweringObjectFile (const TargetLoweringObjectFile &)=delete
 
TargetLoweringObjectFileoperator= (const TargetLoweringObjectFile &)=delete
 
virtual ~TargetLoweringObjectFile ()
 
MCContextgetContext () const
 
ManglergetMangler () const
 
virtual void emitPersonalityValue (MCStreamer &Streamer, const DataLayout &TM, const MCSymbol *Sym) const
 
MCSectionSectionForGlobal (const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const
 This method computes the appropriate section to emit the specified global variable or function definition. More...
 
MCSectionSectionForGlobal (const GlobalObject *GO, const TargetMachine &TM) const
 This method computes the appropriate section to emit the specified global variable or function definition. More...
 
virtual MCSectiongetSectionForJumpTable (const Function &F, const TargetMachine &TM) const
 
virtual bool shouldPutJumpTableInFunctionSection (bool UsesLabelDifference, const Function &F) const
 
MCSymbolgetSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix, const TargetMachine &TM) const
 Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix. More...
 
unsigned getPersonalityEncoding () const
 
unsigned getLSDAEncoding () const
 
unsigned getTTypeEncoding () const
 
const MCExprgetTTypeReference (const MCSymbolRefExpr *Sym, unsigned Encoding, MCStreamer &Streamer) const
 
virtual MCSectiongetStaticCtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual MCSectiongetStaticDtorSection (unsigned Priority, const MCSymbol *KeySym) const
 
virtual const MCExprgetDebugThreadLocalSymbol (const MCSymbol *Sym) const
 Create a symbol reference to describe the given TLS variable when emitting the address in debug info. More...
 
virtual const MCExprlowerRelativeReference (const GlobalValue *LHS, const GlobalValue *RHS, const TargetMachine &TM) const
 
bool supportIndirectSymViaGOTPCRel () const
 Target supports replacing a data "PC"-relative access to a symbol through another symbol, by accessing the later via a GOT entry instead? More...
 
bool supportGOTPCRelWithOffset () const
 Target GOT "PC"-relative relocation supports encoding an additional binary expression with an offset? More...
 
bool supportDebugThreadLocalLocation () const
 Target supports TLS offset relocation in debug section? More...
 
virtual void emitLinkerFlagsForGlobal (raw_ostream &OS, const GlobalValue *GV) const
 
virtual void emitLinkerFlagsForUsed (raw_ostream &OS, const GlobalValue *GV) const
 
virtual MCSectiongetSectionForCommandLines () const
 If supported, return the section to use for the llvm.commandline metadata. More...
 
- Public Member Functions inherited from llvm::MCObjectFileInfo
void InitMCObjectFileInfo (const Triple &TT, bool PIC, MCContext &ctx, bool LargeCodeModel=false)
 
bool getSupportsWeakOmittedEHFrame () const
 
bool getSupportsCompactUnwindWithoutEHFrame () const
 
bool getOmitDwarfIfHaveCompactUnwind () const
 
bool getCommDirectiveSupportsAlignment () const
 
unsigned getFDEEncoding () const
 
unsigned getCompactUnwindDwarfEHFrameOnly () const
 
MCSectiongetTextSection () const
 
MCSectiongetDataSection () const
 
MCSectiongetBSSSection () const
 
MCSectiongetReadOnlySection () const
 
MCSectiongetLSDASection () const
 
MCSectiongetCompactUnwindSection () const
 
MCSectiongetDwarfAbbrevSection () const
 
MCSectiongetDwarfInfoSection () const
 
MCSectiongetDwarfInfoSection (uint64_t Hash) const
 
MCSectiongetDwarfLineSection () const
 
MCSectiongetDwarfLineStrSection () const
 
MCSectiongetDwarfFrameSection () const
 
MCSectiongetDwarfPubNamesSection () const
 
MCSectiongetDwarfPubTypesSection () const
 
MCSectiongetDwarfGnuPubNamesSection () const
 
MCSectiongetDwarfGnuPubTypesSection () const
 
const MCSectiongetDwarfDebugInlineSection () const
 
MCSectiongetDwarfStrSection () const
 
MCSectiongetDwarfLocSection () const
 
MCSectiongetDwarfARangesSection () const
 
MCSectiongetDwarfRangesSection () const
 
MCSectiongetDwarfRnglistsSection () const
 
MCSectiongetDwarfLoclistsSection () const
 
MCSectiongetDwarfMacinfoSection () const
 
MCSectiongetDwarfDebugNamesSection () const
 
MCSectiongetDwarfAccelNamesSection () const
 
MCSectiongetDwarfAccelObjCSection () const
 
MCSectiongetDwarfAccelNamespaceSection () const
 
MCSectiongetDwarfAccelTypesSection () const
 
MCSectiongetDwarfInfoDWOSection () const
 
MCSectiongetDwarfTypesSection (uint64_t Hash) const
 
MCSectiongetDwarfTypesDWOSection () const
 
MCSectiongetDwarfAbbrevDWOSection () const
 
MCSectiongetDwarfStrDWOSection () const
 
MCSectiongetDwarfLineDWOSection () const
 
MCSectiongetDwarfLocDWOSection () const
 
MCSectiongetDwarfStrOffDWOSection () const
 
MCSectiongetDwarfStrOffSection () const
 
MCSectiongetDwarfAddrSection () const
 
MCSectiongetDwarfRnglistsDWOSection () const
 
MCSectiongetDwarfCUIndexSection () const
 
MCSectiongetDwarfTUIndexSection () const
 
MCSectiongetDwarfSwiftASTSection () const
 
MCSectiongetCOFFDebugSymbolsSection () const
 
MCSectiongetCOFFDebugTypesSection () const
 
MCSectiongetCOFFGlobalTypeHashesSection () const
 
MCSectiongetTLSExtraDataSection () const
 
const MCSectiongetTLSDataSection () const
 
MCSectiongetTLSBSSSection () const
 
MCSectiongetStackMapSection () const
 
MCSectiongetFaultMapSection () const
 
MCSectiongetStackSizesSection (const MCSection &TextSec) const
 
MCSectiongetDataRelROSection () const
 
const MCSectiongetMergeableConst4Section () const
 
const MCSectiongetMergeableConst8Section () const
 
const MCSectiongetMergeableConst16Section () const
 
const MCSectiongetMergeableConst32Section () const
 
const MCSectiongetTLSTLVSection () const
 
const MCSectiongetTLSThreadInitSection () const
 
const MCSectiongetCStringSection () const
 
const MCSectiongetUStringSection () const
 
MCSectiongetTextCoalSection () const
 
const MCSectiongetConstTextCoalSection () const
 
const MCSectiongetConstDataSection () const
 
const MCSectiongetDataCoalSection () const
 
const MCSectiongetConstDataCoalSection () const
 
const MCSectiongetDataCommonSection () const
 
MCSectiongetDataBSSSection () const
 
const MCSectiongetFourByteConstantSection () const
 
const MCSectiongetEightByteConstantSection () const
 
const MCSectiongetSixteenByteConstantSection () const
 
MCSectiongetLazySymbolPointerSection () const
 
MCSectiongetNonLazySymbolPointerSection () const
 
MCSectiongetThreadLocalPointerSection () const
 
MCSectiongetDrectveSection () const
 
MCSectiongetPDataSection () const
 
MCSectiongetXDataSection () const
 
MCSectiongetSXDataSection () const
 
MCSectiongetGFIDsSection () const
 
MCSectiongetEHFrameSection ()
 
Environment getObjectFileType () const
 
bool isPositionIndependent () const
 
const TriplegetTargetTriple () const
 
void setSDKVersion (const VersionTuple &TheSDKVersion)
 
const VersionTuplegetSDKVersion () const
 

Additional Inherited Members

- Public Types inherited from llvm::MCObjectFileInfo
enum  Environment { IsMachO, IsELF, IsCOFF, IsWasm }
 
- Static Public Member Functions inherited from llvm::TargetLoweringObjectFile
static SectionKind getKindForGlobal (const GlobalObject *GO, const TargetMachine &TM)
 Classify the specified global variable into a set of target independent categories embodied in SectionKind. More...
 
- Protected Attributes inherited from llvm::TargetLoweringObjectFile
bool SupportIndirectSymViaGOTPCRel = false
 
bool SupportGOTPCRelWithOffset = true
 
bool SupportDebugThreadLocalLocation = true
 
unsigned PersonalityEncoding = 0
 PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values for EH. More...
 
unsigned LSDAEncoding = 0
 
unsigned TTypeEncoding = 0
 
MCSectionStaticCtorSection = nullptr
 This section contains the static constructor pointer list. More...
 
MCSectionStaticDtorSection = nullptr
 This section contains the static destructor pointer list. More...
 
- Protected Attributes inherited from llvm::MCObjectFileInfo
bool CommDirectiveSupportsAlignment
 True if .comm supports alignment. More...
 
bool SupportsWeakOmittedEHFrame
 True if target object file supports a weak_definition of constant 0 for an omitted EH frame. More...
 
bool SupportsCompactUnwindWithoutEHFrame
 True if the target object file supports emitting a compact unwind section without an associated EH frame section. More...
 
bool OmitDwarfIfHaveCompactUnwind
 OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with compact unwind and other with dwarf unwind. More...
 
unsigned FDECFIEncoding = 0
 FDE CFI encoding. More...
 
unsigned CompactUnwindDwarfEHFrameOnly
 Compact unwind encoding indicating that we should emit only an EH frame. More...
 
MCSectionTextSection
 Section directive for standard text. More...
 
MCSectionDataSection
 Section directive for standard data. More...
 
MCSectionBSSSection
 Section that is default initialized to zero. More...
 
MCSectionReadOnlySection
 Section that is readonly and can contain arbitrary initialized data. More...
 
MCSectionLSDASection
 If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. More...
 
MCSectionCompactUnwindSection
 If exception handling is supported by the target and the target can support a compact representation of the CIE and FDE, this is the section to emit them into. More...
 
MCSectionDwarfAbbrevSection
 
MCSectionDwarfInfoSection
 
MCSectionDwarfLineSection
 
MCSectionDwarfLineStrSection
 
MCSectionDwarfFrameSection
 
MCSectionDwarfPubTypesSection
 
const MCSectionDwarfDebugInlineSection
 
MCSectionDwarfStrSection
 
MCSectionDwarfLocSection
 
MCSectionDwarfARangesSection
 
MCSectionDwarfRangesSection
 
MCSectionDwarfMacinfoSection
 
MCSectionDwarfPubNamesSection
 
MCSectionDwarfDebugNamesSection
 Accelerator table sections. More...
 
MCSectionDwarfAccelNamesSection
 
MCSectionDwarfAccelObjCSection
 
MCSectionDwarfAccelNamespaceSection
 
MCSectionDwarfAccelTypesSection
 
MCSectionDwarfInfoDWOSection
 
MCSectionDwarfTypesDWOSection
 
MCSectionDwarfAbbrevDWOSection
 
MCSectionDwarfStrDWOSection
 
MCSectionDwarfLineDWOSection
 
MCSectionDwarfLocDWOSection
 
MCSectionDwarfStrOffDWOSection
 
MCSectionDwarfStrOffSection
 The DWARF v5 string offset and address table sections. More...
 
MCSectionDwarfAddrSection
 
MCSectionDwarfRnglistsSection
 The DWARF v5 range list section. More...
 
MCSectionDwarfLoclistsSection
 The DWARF v5 locations list section. More...
 
MCSectionDwarfRnglistsDWOSection
 The DWARF v5 range list section for fission. More...
 
MCSectionDwarfCUIndexSection
 
MCSectionDwarfTUIndexSection
 
MCSectionDwarfGnuPubNamesSection
 Section for newer gnu pubnames. More...
 
MCSectionDwarfGnuPubTypesSection
 Section for newer gnu pubtypes. More...
 
MCSectionDwarfSwiftASTSection
 
MCSectionCOFFDebugSymbolsSection
 
MCSectionCOFFDebugTypesSection
 
MCSectionCOFFGlobalTypeHashesSection
 
MCSectionTLSExtraDataSection
 Extra TLS Variable Data section. More...
 
MCSectionTLSDataSection
 Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. More...
 
MCSectionTLSBSSSection
 Section directive for Thread Local uninitialized data. More...
 
MCSectionStackMapSection
 StackMap section. More...
 
MCSectionFaultMapSection
 FaultMap section. More...
 
MCSectionEHFrameSection
 EH frame section. More...
 
MCSectionStackSizesSection
 Section containing metadata on function stack sizes. More...
 
DenseMap< const MCSymbol *, unsignedStackSizesUniquing
 
MCSectionDataRelROSection
 
MCSectionMergeableConst4Section
 
MCSectionMergeableConst8Section
 
MCSectionMergeableConst16Section
 
MCSectionMergeableConst32Section
 
MCSectionTLSTLVSection
 Section for thread local structure information. More...
 
const MCSectionTLSThreadInitSection
 Section for thread local data initialization functions. More...
 
MCSectionCStringSection
 
MCSectionUStringSection
 
MCSectionTextCoalSection
 
MCSectionConstTextCoalSection
 
MCSectionConstDataSection
 
MCSectionDataCoalSection
 
MCSectionConstDataCoalSection
 
MCSectionDataCommonSection
 
MCSectionDataBSSSection
 
MCSectionFourByteConstantSection
 
MCSectionEightByteConstantSection
 
MCSectionSixteenByteConstantSection
 
MCSectionLazySymbolPointerSection
 
MCSectionNonLazySymbolPointerSection
 
MCSectionThreadLocalPointerSection
 
MCSectionDrectveSection
 COFF specific sections. More...
 
MCSectionPDataSection
 
MCSectionXDataSection
 
MCSectionSXDataSection
 
MCSectionGFIDsSection
 

Detailed Description

Definition at line 97 of file TargetLoweringObjectFileImpl.h.

Constructor & Destructor Documentation

◆ TargetLoweringObjectFileMachO()

TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO ( )

◆ ~TargetLoweringObjectFileMachO()

llvm::TargetLoweringObjectFileMachO::~TargetLoweringObjectFileMachO ( )
overridedefault

Member Function Documentation

◆ emitModuleMetadata()

void TargetLoweringObjectFileMachO::emitModuleMetadata ( MCStreamer Streamer,
Module M 
) const
overridevirtual

◆ getCFIPersonalitySymbol()

MCSymbol * TargetLoweringObjectFileMachO::getCFIPersonalitySymbol ( const GlobalValue GV,
const TargetMachine TM,
MachineModuleInfo MMI 
) const
overridevirtual

◆ getExplicitSectionGlobal()

MCSection * TargetLoweringObjectFileMachO::getExplicitSectionGlobal ( const GlobalObject GO,
SectionKind  Kind,
const TargetMachine TM 
) const
overridevirtual

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.

Implements llvm::TargetLoweringObjectFile.

Definition at line 911 of file TargetLoweringObjectFileImpl.cpp.

References checkMachOComdat(), llvm::TargetLoweringObjectFile::getContext(), llvm::MCContext::getMachOSection(), llvm::Value::getName(), llvm::GlobalObject::getSection(), llvm::MCSectionMachO::getTypeAndAttributes(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::report_fatal_error(), and llvm::ARMBuildAttrs::Section.

◆ getIndirectSymViaGOTPCRel()

const MCExpr * TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel ( const MCSymbol Sym,
const MCValue MV,
int64_t  Offset,
MachineModuleInfo MMI,
MCStreamer Streamer 
) const
overridevirtual

◆ getNameWithPrefix()

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

◆ getSectionForConstant()

MCSection * TargetLoweringObjectFileMachO::getSectionForConstant ( const DataLayout DL,
SectionKind  Kind,
const Constant C,
unsigned Align 
) const
overridevirtual

◆ getTTypeGlobalReference()

const MCExpr * TargetLoweringObjectFileMachO::getTTypeGlobalReference ( const GlobalValue GV,
unsigned  Encoding,
const TargetMachine TM,
MachineModuleInfo MMI,
MCStreamer Streamer 
) const
overridevirtual

◆ Initialize()

void TargetLoweringObjectFileMachO::Initialize ( MCContext ctx,
const TargetMachine TM 
)
overridevirtual

◆ SelectSectionForGlobal()

MCSection * TargetLoweringObjectFileMachO::SelectSectionForGlobal ( const GlobalObject GO,
SectionKind  Kind,
const TargetMachine TM 
) const
overridevirtual

Implements llvm::TargetLoweringObjectFile.

Definition at line 952 of file TargetLoweringObjectFileImpl.cpp.

References checkMachOComdat(), llvm::MCObjectFileInfo::ConstDataCoalSection, llvm::MCObjectFileInfo::ConstDataSection, llvm::MCObjectFileInfo::ConstTextCoalSection, llvm::MCObjectFileInfo::CStringSection, llvm::MCObjectFileInfo::DataBSSSection, llvm::MCObjectFileInfo::DataCoalSection, llvm::MCObjectFileInfo::DataCommonSection, llvm::MCObjectFileInfo::DataSection, llvm::MCObjectFileInfo::EightByteConstantSection, llvm::MCObjectFileInfo::FourByteConstantSection, llvm::Module::getDataLayout(), llvm::GlobalValue::getParent(), llvm::DataLayout::getPreferredAlignment(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasPrivateLinkage(), llvm::SectionKind::isBSSExtern(), llvm::SectionKind::isBSSLocal(), llvm::SectionKind::isMergeable1ByteCString(), llvm::SectionKind::isMergeable2ByteCString(), llvm::SectionKind::isMergeableConst(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadBSS(), llvm::SectionKind::isThreadData(), llvm::GlobalValue::isWeakForLinker(), llvm::MCObjectFileInfo::ReadOnlySection, llvm::MCObjectFileInfo::SixteenByteConstantSection, llvm::MCObjectFileInfo::TextCoalSection, llvm::MCObjectFileInfo::TextSection, llvm::MCObjectFileInfo::TLSBSSSection, llvm::MCObjectFileInfo::TLSDataSection, and llvm::MCObjectFileInfo::UStringSection.

Referenced by llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal().


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