45 ReadOnlySectionLarge =
102 bool IsCPRel = SectionName.
startswith(
".cp.");
132 if (Kind.
isReadOnly())
return UseCPRel? ReadOnlySectionLarge
133 : DataRelROSectionLarge;
136 return DataSectionLarge;
147 unsigned &
Align)
const {
152 "Unknown section kind");
StringRef getSection() const
Get the custom section of this global if it has one.
Instances of this class represent a uniqued identifier for a section in the current translation unit...
MCSection * MergeableConst4Section
A parsed version of the target data layout string in and methods for querying it. ...
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
bool hasLocalLinkage() const
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
All sections with the "d" flag are grouped together by the linker to form the data section and the dp...
bool isSized(SmallPtrSetImpl< Type *> *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
MCSection * TextSection
Section directive for standard text.
bool isMergeableConst8() const
bool isMergeableCString() const
static unsigned getXCoreSectionFlags(SectionKind K, bool IsCPRel)
All sections with the "c" flag are grouped together by the linker to form the constant pool and the c...
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
MCSection * MergeableConst16Section
MCSection * getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
Targets should implement this method to assign a section to globals with an explicit section specfied...
static const unsigned CodeModelLargeSize
Context object for machine code objects.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
MCSection * DataSection
Section directive for standard data.
bool isReadOnlyWithRel() const
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
SectionKind - This is a simple POD value that classifies the properties of a section.
MCContext & getContext() const
bool isMergeableConst16() const
bool isMergeableConst4() const
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const override
Given a constant with the SectionKind, return a section that it should be placed in.
CodeModel::Model getCodeModel() const
Returns the code model.
static unsigned getXCoreSectionType(SectionKind K)
Type * getValueType() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Module * getParent()
Get the module that this global value is contained inside of...
MCSection * CStringSection
bool isThreadLocal() const
bool isMergeable1ByteCString() const
Primary interface to the complete machine description for the target machine.
MCSection * BSSSection
Section that is default initialized to zero.
StringRef - Represent a constant reference to a string, i.e.
MCSection * ReadOnlySection
Section that is readonly and can contain arbitrary initialized data.
MCSection * DataRelROSection
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
MCSection * MergeableConst8Section