LLVM API Documentation
#include "llvm/Target/TargetLoweringObjectFile.h"#include "llvm/Constants.h"#include "llvm/DerivedTypes.h"#include "llvm/Function.h"#include "llvm/GlobalVariable.h"#include "llvm/MC/MCContext.h"#include "llvm/MC/MCSectionMachO.h"#include "llvm/MC/MCSectionELF.h"#include "llvm/Target/TargetData.h"#include "llvm/Target/TargetMachine.h"#include "llvm/Target/TargetOptions.h"#include "llvm/Support/Mangler.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/StringExtras.h"
Go to the source code of this file.
Typedefs | |
| typedef StringMap< const MCSectionELF * > | ELFUniqueMapTy |
| typedef StringMap< const MCSectionMachO * > | MachOUniqueMapTy |
| typedef StringMap< const MCSectionCOFF * > | COFFUniqueMapTy |
Functions | |
| static bool | isSuitableForBSS (const GlobalVariable *GV) |
| static bool | IsNullTerminatedString (const Constant *C) |
| static SectionKind | getELFKindForNamedSection (const char *Name, SectionKind K) |
| static unsigned | getELFSectionType (const char *Name, SectionKind K) |
| static unsigned | getELFSectionFlags (SectionKind K) |
| static const char * | getSectionPrefixForUniqueGlobal (SectionKind Kind) |
| static const char * | getCOFFSectionPrefixForUniqueGlobal (SectionKind Kind) |
| typedef StringMap<const MCSectionCOFF*> COFFUniqueMapTy |
Definition at line 937 of file TargetLoweringObjectFile.cpp.
| typedef StringMap<const MCSectionELF*> ELFUniqueMapTy |
Definition at line 283 of file TargetLoweringObjectFile.cpp.
| typedef StringMap<const MCSectionMachO*> MachOUniqueMapTy |
Definition at line 639 of file TargetLoweringObjectFile.cpp.
| static const char* getCOFFSectionPrefixForUniqueGlobal | ( | SectionKind | Kind | ) | [static] |
Definition at line 1022 of file TargetLoweringObjectFile.cpp.
References llvm::SectionKind::isText(), and llvm::SectionKind::isWriteable().
Referenced by llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
| static SectionKind getELFKindForNamedSection | ( | const char * | Name, | |
| SectionKind | K | |||
| ) | [static] |
Definition at line 438 of file TargetLoweringObjectFile.cpp.
References llvm::SectionKind::getBSS(), llvm::SectionKind::getThreadBSS(), and llvm::SectionKind::getThreadData().
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal().
| static unsigned getELFSectionFlags | ( | SectionKind | K | ) | [static] |
Definition at line 488 of file TargetLoweringObjectFile.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::MCSectionELF::SHF_ALLOC, llvm::MCSectionELF::SHF_EXECINSTR, llvm::MCSectionELF::SHF_MERGE, llvm::MCSectionELF::SHF_STRINGS, llvm::MCSectionELF::SHF_TLS, and llvm::MCSectionELF::SHF_WRITE.
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
| static unsigned getELFSectionType | ( | const char * | Name, | |
| SectionKind | K | |||
| ) | [static] |
Definition at line 469 of file TargetLoweringObjectFile.cpp.
References llvm::SectionKind::isBSS(), llvm::SectionKind::isThreadBSS(), llvm::MCSectionELF::SHT_FINI_ARRAY, llvm::MCSectionELF::SHT_INIT_ARRAY, llvm::MCSectionELF::SHT_NOBITS, llvm::MCSectionELF::SHT_PREINIT_ARRAY, and llvm::MCSectionELF::SHT_PROGBITS.
Referenced by llvm::TargetLoweringObjectFileELF::getExplicitSectionGlobal(), and llvm::TargetLoweringObjectFileELF::SelectSectionForGlobal().
| static const char* getSectionPrefixForUniqueGlobal | ( | SectionKind | Kind | ) | [static] |
Definition at line 528 of file TargetLoweringObjectFile.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().
IsNullTerminatedString - Return true if the specified constant (which is known to have a type that is an array of 1/2/4 byte elements) ends with a nul value and contains no other nuls in it.
Definition at line 88 of file TargetLoweringObjectFile.cpp.
References llvm::dyn_cast(), llvm::ArrayType::getNumElements(), llvm::Value::getType(), and llvm::ConstantInt::getZExtValue().
Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal().
| static bool isSuitableForBSS | ( | const GlobalVariable * | GV | ) | [static] |
Definition at line 62 of file TargetLoweringObjectFile.cpp.
References llvm::CallingConv::C, llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getSection(), llvm::GlobalVariable::isConstant(), llvm::Constant::isNullValue(), and llvm::NoZerosInBSS.
Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal().