LLVM API Documentation
#include <XCoreTargetObjectFile.h>
Public Member Functions | |
void | Initialize (MCContext &Ctx, const TargetMachine &TM) override |
const MCSection * | getExplicitSectionGlobal (const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override |
const MCSection * | SelectSectionForGlobal (const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override |
const MCSection * | getSectionForConstant (SectionKind Kind, const Constant *C) const override |
Definition at line 19 of file XCoreTargetObjectFile.h.
const MCSection * XCoreTargetObjectFile::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.
Reimplemented from llvm::TargetLoweringObjectFileELF.
Definition at line 122 of file XCoreTargetObjectFile.cpp.
References llvm::TargetLoweringObjectFile::getContext(), llvm::MCContext::getELFSection(), llvm::GlobalValue::getSection(), getXCoreSectionFlags(), getXCoreSectionType(), llvm::SectionKind::isReadOnly(), llvm::report_fatal_error(), and llvm::StringRef::startswith().
const MCSection * XCoreTargetObjectFile::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 mergeable constant with the specified size and relocation information, return a section that it should be placed in.
Reimplemented from llvm::TargetLoweringObjectFileELF.
Definition at line 169 of file XCoreTargetObjectFile.cpp.
References llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::MCObjectFileInfo::MergeableConst16Section, llvm::MCObjectFileInfo::MergeableConst4Section, llvm::MCObjectFileInfo::MergeableConst8Section, and llvm::MCObjectFileInfo::ReadOnlySection.
void XCoreTargetObjectFile::Initialize | ( | MCContext & | ctx, |
const TargetMachine & | TM | ||
) | [override, virtual] |
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.
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 21 of file XCoreTargetObjectFile.cpp.
References llvm::MCObjectFileInfo::BSSSection, llvm::MCObjectFileInfo::CStringSection, llvm::MCObjectFileInfo::DataRelROSection, llvm::MCObjectFileInfo::DataSection, llvm::SectionKind::getBSS(), llvm::SectionKind::getDataRel(), llvm::MCContext::getELFSection(), llvm::SectionKind::getMergeableConst16(), llvm::SectionKind::getMergeableConst4(), llvm::SectionKind::getMergeableConst8(), llvm::SectionKind::getReadOnlyWithRel(), llvm::MCObjectFileInfo::MergeableConst16Section, llvm::MCObjectFileInfo::MergeableConst4Section, llvm::MCObjectFileInfo::MergeableConst8Section, llvm::MCObjectFileInfo::ReadOnlySection, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_NOBITS, llvm::ELF::SHT_PROGBITS, llvm::ELF::XCORE_SHF_CP_SECTION, and llvm::ELF::XCORE_SHF_DP_SECTION.
const MCSection * XCoreTargetObjectFile::SelectSectionForGlobal | ( | const GlobalValue * | GV, |
SectionKind | Kind, | ||
Mangler & | Mang, | ||
const TargetMachine & | TM | ||
) | const [override, virtual] |
Reimplemented from llvm::TargetLoweringObjectFileELF.
Definition at line 135 of file XCoreTargetObjectFile.cpp.
References llvm::MCObjectFileInfo::BSSSection, llvm::CodeModelLargeSize, llvm::MCObjectFileInfo::CStringSection, llvm::MCObjectFileInfo::DataRelROSection, llvm::MCObjectFileInfo::DataSection, llvm::TargetMachine::getCodeModel(), llvm::TargetSubtargetInfo::getDataLayout(), llvm::GlobalValue::getLinkage(), llvm::Type::getPointerElementType(), llvm::TargetMachine::getSubtargetImpl(), llvm::GlobalValue::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::SectionKind::isBSS(), llvm::SectionKind::isCommon(), llvm::SectionKind::isDataRel(), llvm::GlobalValue::isLocalLinkage(), llvm::SectionKind::isMergeable1ByteCString(), llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::Type::isSized(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadLocal(), llvm::MCObjectFileInfo::MergeableConst16Section, llvm::MCObjectFileInfo::MergeableConst4Section, llvm::MCObjectFileInfo::MergeableConst8Section, llvm::MCObjectFileInfo::ReadOnlySection, llvm::report_fatal_error(), llvm::CodeModel::Small, and llvm::MCObjectFileInfo::TextSection.