|
LLVM
10.0.0
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Additional Inherited Members | |
Public Types inherited from llvm::MCObjectFileInfo | |
| enum | Environment { IsMachO, IsELF, IsCOFF, IsWasm, IsXCOFF } |
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 |
| unsigned | CallSiteEncoding = 0 |
| MCSection * | StaticCtorSection = nullptr |
| This section contains the static constructor pointer list. More... | |
| MCSection * | StaticDtorSection = nullptr |
| This section contains the static destructor pointer list. More... | |
Protected Attributes inherited from llvm::MCObjectFileInfo | |
| bool | CommDirectiveSupportsAlignment = false |
| True if .comm supports alignment. More... | |
| bool | SupportsWeakOmittedEHFrame = false |
| True if target object file supports a weak_definition of constant 0 for an omitted EH frame. More... | |
| bool | SupportsCompactUnwindWithoutEHFrame = false |
| True if the target object file supports emitting a compact unwind section without an associated EH frame section. More... | |
| bool | OmitDwarfIfHaveCompactUnwind = false |
| 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 = 0 |
| Compact unwind encoding indicating that we should emit only an EH frame. More... | |
| MCSection * | TextSection = nullptr |
| Section directive for standard text. More... | |
| MCSection * | DataSection = nullptr |
| Section directive for standard data. More... | |
| MCSection * | BSSSection = nullptr |
| Section that is default initialized to zero. More... | |
| MCSection * | ReadOnlySection = nullptr |
| Section that is readonly and can contain arbitrary initialized data. More... | |
| MCSection * | LSDASection = nullptr |
| If exception handling is supported by the target, this is the section the Language Specific Data Area information is emitted to. More... | |
| MCSection * | CompactUnwindSection = nullptr |
| 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... | |
| MCSection * | DwarfAbbrevSection = nullptr |
| MCSection * | DwarfInfoSection = nullptr |
| MCSection * | DwarfLineSection = nullptr |
| MCSection * | DwarfLineStrSection = nullptr |
| MCSection * | DwarfFrameSection = nullptr |
| MCSection * | DwarfPubTypesSection = nullptr |
| const MCSection * | DwarfDebugInlineSection = nullptr |
| MCSection * | DwarfStrSection = nullptr |
| MCSection * | DwarfLocSection = nullptr |
| MCSection * | DwarfARangesSection = nullptr |
| MCSection * | DwarfRangesSection = nullptr |
| MCSection * | DwarfMacinfoSection = nullptr |
| MCSection * | DwarfPubNamesSection = nullptr |
| MCSection * | DwarfDebugNamesSection = nullptr |
| Accelerator table sections. More... | |
| MCSection * | DwarfAccelNamesSection = nullptr |
| MCSection * | DwarfAccelObjCSection = nullptr |
| MCSection * | DwarfAccelNamespaceSection = nullptr |
| MCSection * | DwarfAccelTypesSection = nullptr |
| MCSection * | DwarfInfoDWOSection = nullptr |
| MCSection * | DwarfTypesDWOSection = nullptr |
| MCSection * | DwarfAbbrevDWOSection = nullptr |
| MCSection * | DwarfStrDWOSection = nullptr |
| MCSection * | DwarfLineDWOSection = nullptr |
| MCSection * | DwarfLocDWOSection = nullptr |
| MCSection * | DwarfStrOffDWOSection = nullptr |
| MCSection * | DwarfMacinfoDWOSection = nullptr |
| MCSection * | DwarfStrOffSection = nullptr |
| The DWARF v5 string offset and address table sections. More... | |
| MCSection * | DwarfAddrSection = nullptr |
| MCSection * | DwarfRnglistsSection = nullptr |
| The DWARF v5 range list section. More... | |
| MCSection * | DwarfLoclistsSection = nullptr |
| The DWARF v5 locations list section. More... | |
| MCSection * | DwarfRnglistsDWOSection = nullptr |
| The DWARF v5 range and location list sections for fission. More... | |
| MCSection * | DwarfLoclistsDWOSection = nullptr |
| MCSection * | DwarfCUIndexSection = nullptr |
| MCSection * | DwarfTUIndexSection = nullptr |
| MCSection * | DwarfGnuPubNamesSection = nullptr |
| Section for newer gnu pubnames. More... | |
| MCSection * | DwarfGnuPubTypesSection = nullptr |
| Section for newer gnu pubtypes. More... | |
| MCSection * | DwarfSwiftASTSection = nullptr |
| MCSection * | COFFDebugSymbolsSection = nullptr |
| MCSection * | COFFDebugTypesSection = nullptr |
| MCSection * | COFFGlobalTypeHashesSection = nullptr |
| MCSection * | TLSExtraDataSection = nullptr |
| Extra TLS Variable Data section. More... | |
| MCSection * | TLSDataSection = nullptr |
| Section directive for Thread Local data. ELF, MachO, COFF, and Wasm. More... | |
| MCSection * | TLSBSSSection = nullptr |
| Section directive for Thread Local uninitialized data. More... | |
| MCSection * | StackMapSection = nullptr |
| StackMap section. More... | |
| MCSection * | FaultMapSection = nullptr |
| FaultMap section. More... | |
| MCSection * | RemarksSection = nullptr |
| Remarks section. More... | |
| MCSection * | EHFrameSection = nullptr |
| EH frame section. More... | |
| MCSection * | StackSizesSection = nullptr |
| Section containing metadata on function stack sizes. More... | |
| DenseMap< const MCSymbol *, unsigned > | StackSizesUniquing |
| MCSection * | DataRelROSection = nullptr |
| MCSection * | MergeableConst4Section = nullptr |
| MCSection * | MergeableConst8Section = nullptr |
| MCSection * | MergeableConst16Section = nullptr |
| MCSection * | MergeableConst32Section = nullptr |
| MCSection * | TLSTLVSection = nullptr |
| Section for thread local structure information. More... | |
| const MCSection * | TLSThreadInitSection = nullptr |
| Section for thread local data initialization functions. More... | |
| MCSection * | CStringSection = nullptr |
| MCSection * | UStringSection = nullptr |
| MCSection * | TextCoalSection = nullptr |
| MCSection * | ConstTextCoalSection = nullptr |
| MCSection * | ConstDataSection = nullptr |
| MCSection * | DataCoalSection = nullptr |
| MCSection * | ConstDataCoalSection = nullptr |
| MCSection * | DataCommonSection = nullptr |
| MCSection * | DataBSSSection = nullptr |
| MCSection * | FourByteConstantSection = nullptr |
| MCSection * | EightByteConstantSection = nullptr |
| MCSection * | SixteenByteConstantSection = nullptr |
| MCSection * | LazySymbolPointerSection = nullptr |
| MCSection * | NonLazySymbolPointerSection = nullptr |
| MCSection * | ThreadLocalPointerSection = nullptr |
| MCSection * | DrectveSection = nullptr |
| COFF specific sections. More... | |
| MCSection * | PDataSection = nullptr |
| MCSection * | XDataSection = nullptr |
| MCSection * | SXDataSection = nullptr |
| MCSection * | GFIDsSection = nullptr |
| MCSection * | GLJMPSection = nullptr |
Definition at line 97 of file TargetLoweringObjectFileImpl.h.
| TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO | ( | ) |
Definition at line 855 of file TargetLoweringObjectFileImpl.cpp.
References llvm::TargetLoweringObjectFile::SupportIndirectSymViaGOTPCRel.
|
overridedefault |
|
overridevirtual |
Emit the module flags that specify the garbage collection information.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 884 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCStreamer::AddBlankLine(), llvm::MCStreamer::EmitIntValue(), llvm::MCStreamer::EmitLabel(), llvm::MCStreamer::EmitLinkerOptions(), llvm::StringRef::empty(), llvm::TargetLoweringObjectFile::getContext(), llvm::SectionKind::getData(), llvm::MCContext::getMachOSection(), llvm::Module::getNamedMetadata(), GetObjCImageInfo(), llvm::MCSectionMachO::ParseSectionSpecifier(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, and llvm::MCStreamer::SwitchSection().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 1093 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), and llvm::GlobalValue::hasLocalLinkage().
|
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 937 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.
|
overridevirtual |
Get MachO PC relative GOT entry relocation.
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::AArch64_MachoTargetObjectFile, and llvm::X86_64MachoTargetObjectFile.
Definition at line 1113 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCConstantExpr::create(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCBinaryExpr::createSub(), llvm::MCValue::getConstant(), llvm::TargetLoweringObjectFile::getContext(), llvm::Module::getDataLayout(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getModule(), llvm::MCSymbol::getName(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::DataLayout::getPrivateGlobalPrefix(), llvm::MCValue::getSymB(), llvm::MCSymbolRefExpr::getSymbol(), llvm::GlobalValue::hasLocalLinkage(), Name, and llvm::MCSymbolRefExpr::VK_None.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringObjectFile.
Reimplemented in llvm::AArch64_MachoTargetObjectFile.
Definition at line 1203 of file TargetLoweringObjectFileImpl.cpp.
References canUsePrivateLabel(), llvm::GlobalValue::getBaseObject(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::TargetLoweringObjectFile::getMangler(), llvm::TargetMachine::getMCAsmInfo(), llvm::Mangler::getNameWithPrefix(), and llvm::TargetLoweringObjectFile::SectionForGlobal().
Referenced by llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal().
|
overridevirtual |
Given a constant with the SectionKind, return a section that it should be placed in.
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 1048 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCObjectFileInfo::ConstDataSection, llvm::MCObjectFileInfo::EightByteConstantSection, llvm::MCObjectFileInfo::FourByteConstantSection, llvm::SectionKind::isData(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnlyWithRel(), llvm::MCObjectFileInfo::ReadOnlySection, and llvm::MCObjectFileInfo::SixteenByteConstantSection.
|
overridevirtual |
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 1065 of file TargetLoweringObjectFileImpl.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::dwarf::DW_EH_PE_indirect, llvm::TargetLoweringObjectFile::getContext(), llvm::MachineModuleInfoMachO::getGVStubEntry(), llvm::MachineModuleInfo::getObjFileInfo(), llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer(), llvm::TargetMachine::getSymbol(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), and llvm::GlobalValue::hasLocalLinkage().
Referenced by llvm::X86_64MachoTargetObjectFile::getTTypeGlobalReference(), and llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference().
|
overridevirtual |
This method must be called before any actual lowering is done.
Initialize - 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.
Reimplemented from llvm::TargetLoweringObjectFile.
Definition at line 860 of file TargetLoweringObjectFileImpl.cpp.
References llvm::dwarf::DW_EH_PE_indirect, llvm::dwarf::DW_EH_PE_pcrel, llvm::dwarf::DW_EH_PE_sdata4, llvm::SectionKind::getData(), llvm::MCContext::getMachOSection(), llvm::TargetMachine::getRelocationModel(), llvm::TargetLoweringObjectFile::Initialize(), llvm::TargetLoweringObjectFile::LSDAEncoding, llvm::TargetLoweringObjectFile::PersonalityEncoding, llvm::MachO::S_MOD_INIT_FUNC_POINTERS, llvm::MachO::S_MOD_TERM_FUNC_POINTERS, llvm::Reloc::Static, llvm::TargetLoweringObjectFile::StaticCtorSection, llvm::TargetLoweringObjectFile::StaticDtorSection, and llvm::TargetLoweringObjectFile::TTypeEncoding.
|
overridevirtual |
Implements llvm::TargetLoweringObjectFile.
Definition at line 978 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().
1.8.13