LLVM API Documentation
#include <TargetLoweringObjectFileImpl.h>
Public Member Functions | |
virtual | ~TargetLoweringObjectFileMachO () |
StringRef | getDepLibFromLinkerOpt (StringRef LinkerOption) const override |
void | emitModuleFlags (MCStreamer &Streamer, ArrayRef< Module::ModuleFlagEntry > ModuleFlags, Mangler &Mang, const TargetMachine &TM) const override |
Emit the module flags that specify the garbage collection information. | |
bool | isSectionAtomizableBySymbols (const MCSection &Section) const override |
True if the section is atomized using the symbols in it. This is false if the section is not atomized at all (most ELF sections) or if it is atomized based on its contents (MachO' __TEXT,__cstring for example). | |
const MCSection * | SelectSectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override |
const MCSection * | getExplicitSectionGlobal (const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override |
const MCSection * | getSectionForConstant (SectionKind Kind, const Constant *C) const override |
const MCExpr * | getTTypeGlobalReference (const GlobalValue *GV, unsigned Encoding, Mangler &Mang, const TargetMachine &TM, MachineModuleInfo *MMI, MCStreamer &Streamer) const override |
The mach-o version of this method defaults to returning a stub reference. | |
MCSymbol * | getCFIPersonalitySymbol (const GlobalValue *GV, Mangler &Mang, const TargetMachine &TM, MachineModuleInfo *MMI) const override |
Definition at line 79 of file TargetLoweringObjectFileImpl.h.
virtual llvm::TargetLoweringObjectFileMachO::~TargetLoweringObjectFileMachO | ( | ) | [inline, virtual] |
Definition at line 81 of file TargetLoweringObjectFileImpl.h.
void TargetLoweringObjectFileMachO::emitModuleFlags | ( | MCStreamer & | Streamer, |
ArrayRef< Module::ModuleFlagEntry > | ModuleFlags, | ||
Mangler & | Mang, | ||
const TargetMachine & | TM | ||
) | const [override, virtual] |
Emit the module flags that specify the garbage collection information.
emitModuleFlags - Perform code emission for module flags.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 450 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::AddBlankLine(), llvm::ArrayRef< T >::begin(), llvm::Module::ModuleFlagEntry::Behavior, llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitLinkerOptions(), llvm::StringRef::empty(), llvm::ArrayRef< T >::end(), llvm::SectionKind::getDataNoRel(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::MDString::getString(), llvm::Module::ModuleFlagEntry::Key, llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::report_fatal_error(), llvm::Module::Require, llvm::ARMBuildAttrs::Section, llvm::MCStreamer::SwitchSection(), and llvm::Module::ModuleFlagEntry::Val.
MCSymbol * TargetLoweringObjectFileMachO::getCFIPersonalitySymbol | ( | const GlobalValue * | GV, |
Mangler & | Mang, | ||
const TargetMachine & | TM, | ||
MachineModuleInfo * | MMI | ||
) | const [override, virtual] |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 728 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), llvm::TargetMachine::getSymbol(), and llvm::GlobalValue::hasLocalLinkage().
StringRef TargetLoweringObjectFileMachO::getDepLibFromLinkerOpt | ( | StringRef | LinkerOption | ) | const [override, virtual] |
Extract the dependent library name from a linker option string. Returns StringRef() if the option does not specify a library.
getDepLibFromLinkerOpt - Extract the dependent library name from a linker option string. Returns StringRef() if the option does not specify a library.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 441 of file TargetLoweringObjectFileImpl.cpp.
References llvm::StringRef::startswith(), llvm::LibFunc::strlen, and llvm::StringRef::substr().
const MCSection * TargetLoweringObjectFileMachO::getExplicitSectionGlobal | ( | const GlobalValue * | GV, |
SectionKind | Kind, | ||
Mangler & | Mang, | ||
const TargetMachine & | TM | ||
) | const [override, virtual] |
Targets should implement this method to assign a section to globals with an explicit section specfied. The implementation of this method can assume that GV->hasSection() is true.
Implements llvm::TargetLoweringObjectFile.
Definition at line 533 of file TargetLoweringObjectFileImpl.cpp.
References checkMachOComdat(), llvm::Value::getName(), llvm::GlobalValue::getSection(), llvm::MCSectionMachO::getStubSize(), llvm::MCSectionMachO::getTypeAndAttributes(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::report_fatal_error(), and llvm::ARMBuildAttrs::Section.
const MCSection * TargetLoweringObjectFileMachO::getSectionForConstant | ( | SectionKind | Kind, |
const Constant * | C | ||
) | const [override, virtual] |
Given a constant with the SectionKind, return a section that it should be placed in.
getSectionForConstant - Given a mergable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 680 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::isDataRel(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), and llvm::SectionKind::isReadOnlyWithRel().
const MCExpr * TargetLoweringObjectFileMachO::getTTypeGlobalReference | ( | const GlobalValue * | GV, |
unsigned | Encoding, | ||
Mangler & | Mang, | ||
const TargetMachine & | TM, | ||
MachineModuleInfo * | MMI, | ||
MCStreamer & | Streamer | ||
) | const [override, virtual] |
The mach-o version of this method defaults to returning a stub reference.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 696 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::Create(), llvm::dwarf::DW_EH_PE_indirect, llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfoMachO::getHiddenGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::GlobalValue::hasHiddenVisibility(), and llvm::GlobalValue::hasLocalLinkage().
Referenced by llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), and llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference().
bool TargetLoweringObjectFileMachO::isSectionAtomizableBySymbols | ( | const MCSection & | Section | ) | const [override, virtual] |
True if the section is atomized using the symbols in it. This is false if the section is not atomized at all (most ELF sections) or if it is atomized based on its contents (MachO' __TEXT,__cstring for example).
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 575 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSection::getKind(), llvm::MCSectionMachO::getSectionName(), llvm::MCSectionMachO::getSegmentName(), llvm::MCSectionMachO::getType(), llvm::SectionKind::isMergeable1ByteCString(), llvm::MachO::S_16BYTE_LITERALS, llvm::MachO::S_4BYTE_LITERALS, llvm::MachO::S_8BYTE_LITERALS, llvm::MachO::S_INTERPOSING, llvm::MachO::S_LAZY_SYMBOL_POINTERS, llvm::MachO::S_LITERAL_POINTERS, llvm::MachO::S_MOD_INIT_FUNC_POINTERS, llvm::MachO::S_MOD_TERM_FUNC_POINTERS, llvm::MachO::S_NON_LAZY_SYMBOL_POINTERS, and llvm::ARMBuildAttrs::Section.
const MCSection * TargetLoweringObjectFileMachO::SelectSectionForGlobal | ( | const GlobalValue * | GV, |
SectionKind | Kind, | ||
Mangler & | Mang, | ||
const TargetMachine & | TM | ||
) | const [override, virtual] |
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 611 of file TargetLoweringObjectFileImpl.cpp.
References checkMachOComdat(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::DataLayout::getPreferredAlignment(), llvm::TargetMachine::getSubtargetImpl(), 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(), and llvm::GlobalValue::isWeakForLinker().