llvm::TargetLoweringObjectFile::getSectionForConstant

getSectionForConstant overloads

Synopses

Declared in <llvm/Target/TargetLoweringObjectFile.h>

Given a constant with the SectionKind, return a section that it should be placed in.

virtual
MCSection*
getSectionForConstant(
    DataLayout const& DL,
    SectionKind Kind,
    Constant const* C,
    Align& Alignment,
    Function const* F) const;
» more...

Similar to the function above, but append SectionSuffix to the section name.

virtual
MCSection*
getSectionForConstant(
    DataLayout const& DL,
    SectionKind Kind,
    Constant const* C,
    Align& Alignment,
    Function const* F,
    StringRef SectionSuffix) const;
» more...

Return Value

  • The section that should hold the constant.
  • The section that should hold the constant, with SectionSuffix appended to its name.

Parameters

NameDescription
DLData layout used to size and align the constant.
KindSection kind classifying the constant.
CConstant being placed, or nullptr when not applicable.
AlignmentIn/out alignment required for the constant.
FFunction owning the constant pool entry, if any.
SectionSuffixSuffix appended to the chosen section name.