aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp9
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);
}