LLVM API Documentation
#include <MCSectionMachO.h>
Public Member Functions | |
StringRef | getSegmentName () const |
StringRef | getSectionName () const |
std::string | getLabelBeginName () const override |
std::string | getLabelEndName () const override |
unsigned | getTypeAndAttributes () const |
unsigned | getStubSize () const |
MachO::SectionType | getType () const |
bool | hasAttribute (unsigned Value) const |
void | PrintSwitchToSection (const MCAsmInfo &MAI, raw_ostream &OS, const MCExpr *Subsection) const override |
bool | UseCodeAlign () const override |
bool | isVirtualSection () const override |
Static Public Member Functions | |
static std::string | ParseSectionSpecifier (StringRef Spec, StringRef &Segment, StringRef &Section, unsigned &TAA, bool &TAAParsed, unsigned &StubSize) |
static bool | classof (const MCSection *S) |
Friends | |
class | MCContext |
MCSectionMachO - This represents a section on a Mach-O system (used by Mac OS X). On a Mac system, these are also described in /usr/include/mach-o/loader.h.
Definition at line 26 of file MCSectionMachO.h.
static bool llvm::MCSectionMachO::classof | ( | const MCSection * | S | ) | [inline, static] |
Definition at line 93 of file MCSectionMachO.h.
References llvm::MCSection::getVariant(), and llvm::MCSection::SV_MachO.
std::string llvm::MCSectionMachO::getLabelBeginName | ( | ) | const [inline, override, virtual] |
Implements llvm::MCSection.
Definition at line 56 of file MCSectionMachO.h.
References getSectionName(), and getSegmentName().
std::string llvm::MCSectionMachO::getLabelEndName | ( | ) | const [inline, override, virtual] |
Implements llvm::MCSection.
Definition at line 60 of file MCSectionMachO.h.
References getSectionName(), and getSegmentName().
StringRef llvm::MCSectionMachO::getSectionName | ( | ) | const [inline] |
Definition at line 49 of file MCSectionMachO.h.
Referenced by getLabelBeginName(), getLabelEndName(), llvm::TargetLoweringObjectFileMachO::isSectionAtomizableBySymbols(), PrintSwitchToSection(), and llvm::MachObjectWriter::WriteSection().
StringRef llvm::MCSectionMachO::getSegmentName | ( | ) | const [inline] |
Definition at line 43 of file MCSectionMachO.h.
Referenced by getLabelBeginName(), getLabelEndName(), llvm::TargetLoweringObjectFileMachO::isSectionAtomizableBySymbols(), PrintSwitchToSection(), and llvm::MachObjectWriter::WriteSection().
unsigned llvm::MCSectionMachO::getStubSize | ( | ) | const [inline] |
Definition at line 65 of file MCSectionMachO.h.
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), and llvm::MachObjectWriter::WriteSection().
MachO::SectionType llvm::MCSectionMachO::getType | ( | ) | const [inline] |
Definition at line 67 of file MCSectionMachO.h.
References llvm::MachO::SECTION_TYPE.
Referenced by llvm::MachObjectWriter::BindIndirectSymbols(), llvm::TargetLoweringObjectFileMachO::isSectionAtomizableBySymbols(), isVirtualSection(), PrintSwitchToSection(), and llvm::MachObjectWriter::WriteObject().
unsigned llvm::MCSectionMachO::getTypeAndAttributes | ( | ) | const [inline] |
Definition at line 64 of file MCSectionMachO.h.
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), PrintSwitchToSection(), and llvm::MachObjectWriter::WriteSection().
bool llvm::MCSectionMachO::hasAttribute | ( | unsigned | Value | ) | const [inline] |
Definition at line 71 of file MCSectionMachO.h.
Referenced by UseCodeAlign().
bool MCSectionMachO::isVirtualSection | ( | ) | const [override, virtual] |
isVirtualSection - Check whether this section is "virtual", that is has no actual object file contents.
Implements llvm::MCSection.
Definition at line 158 of file MCSectionMachO.cpp.
References getType(), llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_THREAD_LOCAL_ZEROFILL, and llvm::MachO::S_ZEROFILL.
std::string MCSectionMachO::ParseSectionSpecifier | ( | StringRef | Spec, |
StringRef & | Segment, | ||
StringRef & | Section, | ||
unsigned & | TAA, | ||
bool & | TAAParsed, | ||
unsigned & | StubSize | ||
) | [static] |
ParseSectionSpecifier - Parse the section specifier indicated by "Spec". This is a string that can appear after a .section directive in a mach-o flavored .s file. If successful, this fills in the specified Out parameters and returns an empty string. When an invalid section specifier is present, this returns a string indicating the problem. If no TAA was parsed, TAA is not altered, and TAAWasSet becomes false.
ParseSectionSpecifier - Parse the section specifier indicated by "Spec". This is a string that can appear after a .section directive in a mach-o flavored .s file. If successful, this fills in the specified Out parameters and returns an empty string. When an invalid section specifier is present, this returns a string indicating the problem.
Definition at line 169 of file MCSectionMachO.cpp.
References llvm::sys::path::begin(), llvm::StringRef::empty(), llvm::sys::path::end(), llvm::StringRef::getAsInteger(), llvm::MachO::S_SYMBOL_STUBS, llvm::MachO::SECTION_TYPE, SectionAttrDescriptors, SectionTypeDescriptors, llvm::StringRef::size(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::StringRef::split().
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), and llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal().
void MCSectionMachO::PrintSwitchToSection | ( | const MCAsmInfo & | MAI, |
raw_ostream & | OS, | ||
const MCExpr * | Subsection | ||
) | const [override, virtual] |
Implements llvm::MCSection.
Definition at line 90 of file MCSectionMachO.cpp.
References AssemblerName, AttrFlag, getSectionName(), getSegmentName(), getType(), getTypeAndAttributes(), llvm::MachO::LAST_KNOWN_SECTION_TYPE, llvm::MachO::SECTION_ATTRIBUTES, SectionAttrDescriptors, and SectionTypeDescriptors.
bool MCSectionMachO::UseCodeAlign | ( | ) | const [override, virtual] |
Implements llvm::MCSection.
Definition at line 154 of file MCSectionMachO.cpp.
References hasAttribute(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
friend class MCContext [friend] |
Definition at line 40 of file MCSectionMachO.h.