LLVM API Documentation

llvm::TargetLoweringObjectFileELF Class Reference

#include <TargetLoweringObjectFile.h>

Inheritance diagram for llvm::TargetLoweringObjectFileELF:
[legend]
Collaboration diagram for llvm::TargetLoweringObjectFileELF:
[legend]

List of all members.

Public Member Functions

 TargetLoweringObjectFileELF ()
 ~TargetLoweringObjectFileELF ()
virtual void Initialize (MCContext &Ctx, const TargetMachine &TM)
virtual const MCSection * getSectionForConstant (SectionKind Kind) const
virtual const MCSection * getExplicitSectionGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const
virtual const MCSection * SelectSectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const

Protected Member Functions

const MCSection * getELFSection (StringRef Section, unsigned Type, unsigned Flags, SectionKind Kind, bool IsExplicit=false) const

Protected Attributes

const MCSection * TLSDataSection
const MCSection * TLSBSSSection
const MCSection * DataRelSection
const MCSection * DataRelLocalSection
const MCSection * DataRelROSection
const MCSection * DataRelROLocalSection
const MCSection * MergeableConst4Section
const MCSection * MergeableConst8Section
const MCSection * MergeableConst16Section


Detailed Description

Definition at line 185 of file TargetLoweringObjectFile.h.


Constructor & Destructor Documentation

llvm::TargetLoweringObjectFileELF::TargetLoweringObjectFileELF (  )  [inline]

Definition at line 211 of file TargetLoweringObjectFile.h.

TargetLoweringObjectFileELF::~TargetLoweringObjectFileELF (  ) 

Definition at line 285 of file TargetLoweringObjectFile.cpp.


Member Function Documentation

const MCSection * TargetLoweringObjectFileELF::getELFSection ( StringRef  Section,
unsigned  Type,
unsigned  Flags,
SectionKind  Kind,
bool  IsExplicit = false 
) const [protected]

void TargetLoweringObjectFileELF::Initialize ( MCContext &  ctx,
const TargetMachine &  TM 
) [virtual]

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.

Reimplemented in llvm::ARMElfTargetObjectFile, llvm::MipsTargetObjectFile, and llvm::XCoreTargetObjectFile.

Definition at line 305 of file TargetLoweringObjectFile.cpp.

References llvm::TargetLoweringObjectFile::BSSSection, DataRelLocalSection, DataRelROLocalSection, DataRelROSection, DataRelSection, llvm::TargetLoweringObjectFile::DataSection, llvm::TargetLoweringObjectFile::DwarfAbbrevSection, llvm::TargetLoweringObjectFile::DwarfARangesSection, llvm::TargetLoweringObjectFile::DwarfFrameSection, llvm::TargetLoweringObjectFile::DwarfInfoSection, llvm::TargetLoweringObjectFile::DwarfLineSection, llvm::TargetLoweringObjectFile::DwarfLocSection, llvm::TargetLoweringObjectFile::DwarfMacroInfoSection, llvm::TargetLoweringObjectFile::DwarfPubNamesSection, llvm::TargetLoweringObjectFile::DwarfPubTypesSection, llvm::TargetLoweringObjectFile::DwarfRangesSection, llvm::TargetLoweringObjectFile::DwarfStrSection, llvm::TargetLoweringObjectFile::EHFrameSection, llvm::SectionKind::getBSS(), llvm::SectionKind::getDataRel(), llvm::SectionKind::getDataRelLocal(), getELFSection(), llvm::SectionKind::getMergeableConst16(), llvm::SectionKind::getMergeableConst4(), llvm::SectionKind::getMergeableConst8(), llvm::SectionKind::getMetadata(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::SectionKind::getReadOnlyWithRelLocal(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), llvm::TargetLoweringObjectFile::Initialize(), llvm::TargetLoweringObjectFile::LSDASection, MergeableConst16Section, MergeableConst4Section, MergeableConst8Section, llvm::TargetLoweringObjectFile::ReadOnlySection, llvm::MCSectionELF::SHF_ALLOC, llvm::MCSectionELF::SHF_EXECINSTR, llvm::MCSectionELF::SHF_MERGE, llvm::MCSectionELF::SHF_TLS, llvm::MCSectionELF::SHF_WRITE, llvm::MCSectionELF::SHT_NOBITS, llvm::MCSectionELF::SHT_PROGBITS, llvm::TargetLoweringObjectFile::StaticCtorSection, llvm::TargetLoweringObjectFile::StaticDtorSection, llvm::TargetLoweringObjectFile::TextSection, TLSBSSSection, and TLSDataSection.

Referenced by llvm::XCoreTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), and llvm::ARMElfTargetObjectFile::Initialize().

const MCSection * TargetLoweringObjectFileELF::getSectionForConstant ( SectionKind  Kind  )  const [virtual]

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

getSectionForConstant - Given a mergeable constant with the specified size and relocation information, return a section that it should be placed in.

Reimplemented from llvm::TargetLoweringObjectFile.

Definition at line 620 of file TargetLoweringObjectFile.cpp.

References DataRelROLocalSection, DataRelROSection, llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::SectionKind::isReadOnlyWithRelLocal(), MergeableConst16Section, MergeableConst4Section, MergeableConst8Section, and llvm::TargetLoweringObjectFile::ReadOnlySection.

const MCSection * TargetLoweringObjectFileELF::getExplicitSectionGlobal ( const GlobalValue *  GV,
SectionKind  Kind,
Mangler *  Mang,
const TargetMachine &  TM 
) const [virtual]

getExplicitSectionGlobal - 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 516 of file TargetLoweringObjectFile.cpp.

References getELFKindForNamedSection(), getELFSection(), getELFSectionFlags(), getELFSectionType(), and llvm::GlobalValue::getSection().

const MCSection * TargetLoweringObjectFileELF::SelectSectionForGlobal ( const GlobalValue *  GV,
SectionKind  Kind,
Mangler *  Mang,
const TargetMachine &  TM 
) const [virtual]

Reimplemented from llvm::TargetLoweringObjectFile.

Reimplemented in llvm::MipsTargetObjectFile.

Definition at line 546 of file TargetLoweringObjectFile.cpp.

References Align, llvm::TargetLoweringObjectFile::BSSSection, DataRelLocalSection, DataRelROLocalSection, DataRelROSection, DataRelSection, llvm::TargetLoweringObjectFile::DataSection, getELFSection(), getELFSectionFlags(), getELFSectionType(), llvm::Value::getNameStr(), llvm::TargetData::getPreferredAlignment(), getSectionPrefixForUniqueGlobal(), llvm::TargetMachine::getTargetData(), llvm::SectionKind::isBSS(), llvm::SectionKind::isDataNoRel(), llvm::SectionKind::isDataRel(), llvm::SectionKind::isDataRelLocal(), llvm::SectionKind::isMergeable1ByteCString(), llvm::SectionKind::isMergeable2ByteCString(), llvm::SectionKind::isMergeable4ByteCString(), llvm::SectionKind::isMergeableConst(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::SectionKind::isReadOnlyWithRelLocal(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadBSS(), llvm::SectionKind::isThreadData(), llvm::GlobalValue::isWeakForLinker(), llvm::Mangler::makeNameProper(), MergeableConst16Section, MergeableConst4Section, MergeableConst8Section, Name, llvm::cl::Prefix, llvm::TargetLoweringObjectFile::ReadOnlySection, llvm::MCSectionELF::SHF_ALLOC, llvm::MCSectionELF::SHF_MERGE, llvm::MCSectionELF::SHF_STRINGS, llvm::MCSectionELF::SHT_PROGBITS, llvm::TargetLoweringObjectFile::TextSection, TLSBSSSection, TLSDataSection, and llvm::utostr().

Referenced by llvm::MipsTargetObjectFile::SelectSectionForGlobal().


Member Data Documentation

TLSDataSection - Section directive for Thread Local data.

Definition at line 190 of file TargetLoweringObjectFile.h.

Referenced by Initialize(), llvm::XCoreTargetObjectFile::Initialize(), and SelectSectionForGlobal().

TLSBSSSection - Section directive for Thread Local uninitialized data. Null if this target doesn't support a BSS section.

Definition at line 195 of file TargetLoweringObjectFile.h.

Referenced by Initialize(), llvm::XCoreTargetObjectFile::Initialize(), and SelectSectionForGlobal().


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