LLVM API Documentation
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCSectionCOFF.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/ELF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Go to the source code of this file.
Functions | |
static SectionKind | getELFKindForNamedSection (StringRef Name, SectionKind K) |
static unsigned | getELFSectionType (StringRef Name, SectionKind K) |
static unsigned | getELFSectionFlags (SectionKind K) |
static const Comdat * | getELFComdat (const GlobalValue *GV) |
static StringRef | getSectionPrefixForGlobal (SectionKind Kind) |
static const MCSectionELF * | getStaticStructorSection (MCContext &Ctx, bool UseInitArray, bool IsCtor, unsigned Priority, const MCSymbol *KeySym) |
static void | checkMachOComdat (const GlobalValue *GV) |
static unsigned | getCOFFSectionFlags (SectionKind K) |
static const GlobalValue * | getComdatGVForCOFF (const GlobalValue *GV) |
static int | getSelectionForCOFF (const GlobalValue *GV) |
static const char * | getCOFFSectionNameForUniqueGlobal (SectionKind Kind) |
static void checkMachOComdat | ( | const GlobalValue * | GV | ) | [static] |
Definition at line 524 of file TargetLoweringObjectFileImpl.cpp.
References llvm::CallingConv::C, llvm::GlobalValue::getComdat(), llvm::Comdat::getName(), and llvm::report_fatal_error().
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileMachO::SelectSectionForGlobal().
static unsigned getCOFFSectionFlags | ( | SectionKind | K | ) | [static] |
Definition at line 753 of file TargetLoweringObjectFileImpl.cpp.
References llvm::COFF::IMAGE_SCN_CNT_CODE, llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA, llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA, llvm::COFF::IMAGE_SCN_MEM_DISCARDABLE, llvm::COFF::IMAGE_SCN_MEM_EXECUTE, llvm::COFF::IMAGE_SCN_MEM_READ, llvm::COFF::IMAGE_SCN_MEM_WRITE, llvm::SectionKind::isBSS(), llvm::SectionKind::isMetadata(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadLocal(), and llvm::SectionKind::isWriteable().
Referenced by llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
static const char* getCOFFSectionNameForUniqueGlobal | ( | SectionKind | Kind | ) | [static] |
Definition at line 861 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::isBSS(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadLocal(), and llvm::SectionKind::isWriteable().
Referenced by llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
static const GlobalValue* getComdatGVForCOFF | ( | const GlobalValue * | GV | ) | [static] |
Definition at line 787 of file TargetLoweringObjectFileImpl.cpp.
References llvm::CallingConv::C, llvm::GlobalValue::getComdat(), llvm::Comdat::getName(), llvm::Module::getNamedValue(), llvm::GlobalValue::getParent(), and llvm::report_fatal_error().
Referenced by llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), getSelectionForCOFF(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
static const Comdat* getELFComdat | ( | const GlobalValue * | GV | ) | [static] |
Definition at line 197 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SystemZICMP::Any, llvm::CallingConv::C, llvm::GlobalValue::getComdat(), llvm::Comdat::getName(), llvm::Comdat::getSelectionKind(), and llvm::report_fatal_error().
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
static SectionKind getELFKindForNamedSection | ( | StringRef | Name, |
SectionKind | K | ||
) | [static] |
Definition at line 116 of file TargetLoweringObjectFileImpl.cpp.
References llvm::StringRef::empty(), llvm::SectionKind::getBSS(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), and llvm::StringRef::startswith().
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal().
static unsigned getELFSectionFlags | ( | SectionKind | K | ) | [static] |
Definition at line 171 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::isMergeableConst16(), llvm::SectionKind::isMergeableConst4(), llvm::SectionKind::isMergeableConst8(), llvm::SectionKind::isMergeableCString(), llvm::SectionKind::isMetadata(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadLocal(), llvm::SectionKind::isWriteable(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXECINSTR, llvm::ELF::SHF_MERGE, llvm::ELF::SHF_STRINGS, llvm::ELF::SHF_TLS, and llvm::ELF::SHF_WRITE.
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
static unsigned getELFSectionType | ( | StringRef | Name, |
SectionKind | K | ||
) | [static] |
Definition at line 152 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::isBSS(), llvm::SectionKind::isThreadBSS(), llvm::ELF::SHT_FINI_ARRAY, llvm::ELF::SHT_INIT_ARRAY, llvm::ELF::SHT_NOBITS, llvm::ELF::SHT_PREINIT_ARRAY, and llvm::ELF::SHT_PROGBITS.
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
static StringRef getSectionPrefixForGlobal | ( | SectionKind | Kind | ) | [static] |
getSectionPrefixForGlobal - Return the section prefix name used by options FunctionsSections and DataSections.
Definition at line 230 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::isBSS(), llvm::SectionKind::isDataNoRel(), llvm::SectionKind::isDataRel(), llvm::SectionKind::isDataRelLocal(), llvm::SectionKind::isReadOnly(), llvm::SectionKind::isReadOnlyWithRel(), llvm::SectionKind::isReadOnlyWithRelLocal(), llvm::SectionKind::isText(), llvm::SectionKind::isThreadBSS(), and llvm::SectionKind::isThreadData().
Referenced by llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
static int getSelectionForCOFF | ( | const GlobalValue * | GV | ) | [static] |
Definition at line 804 of file TargetLoweringObjectFileImpl.cpp.
References llvm::Comdat::Any, llvm::CallingConv::C, llvm::Comdat::ExactMatch, llvm::GlobalValue::getComdat(), getComdatGVForCOFF(), llvm::COFF::IMAGE_COMDAT_SELECT_ANY, llvm::COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE, llvm::COFF::IMAGE_COMDAT_SELECT_EXACT_MATCH, llvm::COFF::IMAGE_COMDAT_SELECT_LARGEST, llvm::COFF::IMAGE_COMDAT_SELECT_NODUPLICATES, llvm::COFF::IMAGE_COMDAT_SELECT_SAME_SIZE, llvm::GlobalValue::isWeakForLinker(), llvm::Comdat::Largest, llvm::Comdat::NoDuplicates, and llvm::Comdat::SameSize.
Referenced by llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
static const MCSectionELF* getStaticStructorSection | ( | MCContext & | Ctx, |
bool | UseInitArray, | ||
bool | IsCtor, | ||
unsigned | Priority, | ||
const MCSymbol * | KeySym | ||
) | [static] |
Definition at line 361 of file TargetLoweringObjectFileImpl.cpp.
References llvm::SectionKind::getDataRel(), llvm::MCContext::getELFSection(), llvm::MCSymbol::getName(), Name, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_FINI_ARRAY, llvm::ELF::SHT_INIT_ARRAY, llvm::ELF::SHT_PROGBITS, Type, and llvm::utostr().
Referenced by llvm::TargetLoweringObjectFileELF::getStaticCtorSection(), and llvm::TargetLoweringObjectFileELF::getStaticDtorSection().