diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Vendor import of llvm-project main llvmorg-14-init-10186-gff7f2cfa959b.vendor/llvm-project/llvmorg-14-init-10186-gff7f2cfa959b
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp index 25466786ee41..7df32e4072e3 100644 --- a/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp @@ -90,9 +90,8 @@ static bool isSmallDataSection(StringRef Sec) { return true; // If either ".sdata." or ".sbss." is a substring of the section name // then put the symbol in small data. - return Sec.find(".sdata.") != StringRef::npos || - Sec.find(".sbss.") != StringRef::npos || - Sec.find(".scommon.") != StringRef::npos; + return Sec.contains(".sdata.") || Sec.contains(".sbss.") || + Sec.contains(".scommon."); } static const char *getSectionSuffixForSize(unsigned Size) { @@ -178,10 +177,10 @@ MCSection *HexagonTargetObjectFile::getExplicitSectionGlobal( if (GO->hasSection()) { StringRef Section = GO->getSection(); - if (Section.find(".access.text.group") != StringRef::npos) + if (Section.contains(".access.text.group")) return getContext().getELFSection(GO->getSection(), ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_EXECINSTR); - if (Section.find(".access.data.group") != StringRef::npos) + if (Section.contains(".access.data.group")) return getContext().getELFSection(GO->getSection(), ELF::SHT_PROGBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); } |
