LLVM 18.0.0git
|
This represents a section on a Mach-O system (used by Mac OS X). More...
#include "llvm/MC/MCSectionMachO.h"
Static Public Member Functions | |
static Error | ParseSectionSpecifier (StringRef Spec, StringRef &Segment, StringRef &Section, unsigned &TAA, bool &TAAParsed, unsigned &StubSize) |
Parse the section specifier indicated by "Spec". | |
static bool | classof (const MCSection *S) |
![]() | |
static FragmentListType MCSection::* | getSublistAccess (MCFragment *) |
Support for MCFragment::getNextNode(). | |
Friends | |
class | MCContext |
Additional Inherited Members | |
![]() | |
enum | SectionVariant { SV_COFF = 0 , SV_ELF , SV_GOFF , SV_MachO , SV_Wasm , SV_XCOFF , SV_SPIRV , SV_DXContainer } |
enum | BundleLockStateType { NotBundleLocked , BundleLocked , BundleLockedAlignToEnd } |
Express the state of bundle locked groups while emitting code. More... | |
using | FragmentListType = iplist< MCFragment > |
using | const_iterator = FragmentListType::const_iterator |
using | iterator = FragmentListType::iterator |
using | const_reverse_iterator = FragmentListType::const_reverse_iterator |
using | reverse_iterator = FragmentListType::reverse_iterator |
![]() | |
static constexpr unsigned | NonUniqueID = ~0U |
![]() | |
MCSection (SectionVariant V, StringRef Name, SectionKind K, MCSymbol *Begin) | |
~MCSection () | |
![]() | |
StringRef | Name |
SectionVariant | Variant |
SectionKind | Kind |
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 24 of file MCSectionMachO.h.
Definition at line 77 of file MCSectionMachO.h.
References llvm::MCSection::getVariant(), and llvm::MCSection::SV_MachO.
|
inline |
Definition at line 40 of file MCSectionMachO.h.
Referenced by canGoAfterDWARF(), canUseLocalRelocation(), llvm::MCAsmInfoDarwin::isSectionAtomizableBySymbols(), and printSwitchToSection().
|
inline |
Definition at line 48 of file MCSectionMachO.h.
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal().
|
inline |
Definition at line 50 of file MCSectionMachO.h.
References llvm::MachO::SECTION_TYPE.
Referenced by canUseLocalRelocation(), llvm::MCAsmInfoDarwin::isSectionAtomizableBySymbols(), isVirtualSection(), and printSwitchToSection().
|
inline |
Definition at line 47 of file MCSectionMachO.h.
Referenced by llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), and printSwitchToSection().
Definition at line 54 of file MCSectionMachO.h.
Referenced by useCodeAlign().
|
overridevirtual |
Check whether this section is "virtual", that is has no actual object file contents.
Implements llvm::MCSection.
Definition at line 175 of file MCSectionMachO.cpp.
References getType(), llvm::MachO::S_GB_ZEROFILL, llvm::MachO::S_THREAD_LOCAL_ZEROFILL, and llvm::MachO::S_ZEROFILL.
|
static |
Parse the section specifier indicated by "Spec".
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 an Error indicating the problem. If no TAA was parsed, TAA is not altered, and TAAWasSet becomes false.
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 186 of file MCSectionMachO.cpp.
References llvm::createStringError(), llvm::StringRef::empty(), llvm::find_if(), llvm::StringRef::getAsInteger(), Idx, llvm::inconvertibleErrorCode(), llvm::MachO::S_SYMBOL_STUBS, llvm::MachO::SECTION_TYPE, SectionAttrDescriptors, SectionTypeDescriptors, llvm::SmallVectorBase< Size_T >::size(), and llvm::Error::success().
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), and llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal().
|
overridevirtual |
Implements llvm::MCSection.
Definition at line 107 of file MCSectionMachO.cpp.
References AssemblerName, assert(), AttrFlag, llvm::StringRef::empty(), llvm::MCSection::getName(), getSegmentName(), getType(), getTypeAndAttributes(), llvm::MachO::LAST_KNOWN_SECTION_TYPE, OS, llvm::MachO::SECTION_ATTRIBUTES, SectionAttrDescriptors, and SectionTypeDescriptors.
|
overridevirtual |
Return true if a .align directive should use "optimized nops" to fill instead of 0s.
Implements llvm::MCSection.
Definition at line 171 of file MCSectionMachO.cpp.
References hasAttribute(), and llvm::MachO::S_ATTR_PURE_INSTRUCTIONS.
|
friend |
Definition at line 37 of file MCSectionMachO.h.