13#ifndef LLVM_MC_MCSECTIONXCOFF_H
14#define LLVM_MC_MCSECTIONXCOFF_H
35 std::optional<XCOFF::CsectProperties> CsectProp;
38 std::optional<XCOFF::DwarfSectionSubtypeFlags> DwarfSubtypeFlags;
39 bool MultiSymbolsAllowed;
40 static constexpr unsigned DefaultAlignVal = 4;
41 static constexpr unsigned DefaultTextAlignVal = 32;
46 bool MultiSymbolsAllowed)
49 SymbolTableName(SymbolTableName), DwarfSubtypeFlags(
std::nullopt),
50 MultiSymbolsAllowed(MultiSymbolsAllowed) {
53 "Invalid or unhandled type for csect.");
54 assert(QualName !=
nullptr &&
"QualName is needed.");
57 "Invalid csect type for storage mapping class XCOFF::XMC_UL");
71 MCSectionXCOFF(StringRef
Name, SectionKind K, MCSymbolXCOFF *QualName,
73 MCSymbol *Begin, StringRef SymbolTableName,
74 bool MultiSymbolsAllowed)
75 : MCSection(
SV_XCOFF,
Name, K, Begin), QualName(QualName),
76 SymbolTableName(SymbolTableName), DwarfSubtypeFlags(DwarfSubtypeFlags),
77 MultiSymbolsAllowed(MultiSymbolsAllowed) {
78 assert(QualName !=
nullptr &&
"QualName is needed.");
81 QualName->setRepresentedCsect(
this);
87 void printCsectDirective(raw_ostream &
OS)
const;
97 assert(
isCsect() &&
"Only csect section has mapping class property!");
98 return CsectProp->MappingClass;
101 return QualName->getStorageClass();
104 return QualName->getVisibilityType();
107 assert(
isCsect() &&
"Only csect section has symbol type property!");
108 return CsectProp->Type;
114 const MCExpr *Subsection)
const override;
119 bool isCsect()
const {
return CsectProp.has_value(); }
120 bool isDwarfSect()
const {
return DwarfSubtypeFlags.has_value(); }
122 return DwarfSubtypeFlags;
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class is intended to be used as a base class for asm properties and features specific to the tar...
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
std::optional< XCOFF::CsectProperties > getCsectProp() const
bool isMultiSymbolsAllowed() const
bool isVirtualSection() const override
Check whether this section is "virtual", that is has no actual object file contents.
StringRef getSymbolTableName() const
XCOFF::VisibilityType getVisibilityType() const
std::optional< XCOFF::DwarfSectionSubtypeFlags > getDwarfSubtypeFlags() const
void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, const MCExpr *Subsection) const override
XCOFF::StorageClass getStorageClass() const
XCOFF::StorageMappingClass getMappingClass() const
MCSymbolXCOFF * getQualNameSymbol() const
static bool classof(const MCSection *S)
bool useCodeAlign() const override
Return true if a .align directive should use "optimized nops" to fill instead of 0s.
XCOFF::SymbolType getCSectType() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void setAlignment(Align Value)
SectionVariant getVariant() const
void setRepresentedCsect(MCSectionXCOFF *C)
void setStorageClass(XCOFF::StorageClass SC)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
SectionKind - This is a simple POD value that classifies the properties of a section.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
This class implements an extremely fast bulk output stream that can only output to a stream.
DwarfSectionSubtypeFlags
Values for defining the section subtype of sections of type STYP_DWARF as they would appear in the (s...
VisibilityType
Values for visibility as they would appear when encoded in the high 4 bits of the 16-bit unsigned n_t...
StorageMappingClass
Storage Mapping Class definitions.
@ XMC_UL
Uninitialized thread-local variable.
@ XTY_CM
Common csect definition. For uninitialized storage.
@ XTY_SD
Csect definition for initialized storage.
@ XTY_ER
External reference.
This is an optimization pass for GlobalISel generic memory operations.