aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-01-31 23:54:07 -0800
committerKazu Hirata <kazu@google.com>2024-01-31 23:54:07 -0800
commit39fa304866e16f1408a0cab9437e47e4ebacf206 (patch)
tree371c2aaa830ce6efdbc6e2e101ecb149aa0cfe73 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parente8512786fedbfa6ddba70ceddc29d7122173ba5e (diff)
downloadllvm-39fa304866e16f1408a0cab9437e47e4ebacf206.zip
llvm-39fa304866e16f1408a0cab9437e47e4ebacf206.tar.gz
llvm-39fa304866e16f1408a0cab9437e47e4ebacf206.tar.bz2
[llvm] Use StringRef::starts_with (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index b0cdd63..2c5b0b3 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -479,7 +479,7 @@ static SectionKind getELFKindForNamedSection(StringRef Name, SectionKind K) {
Name == ".llvmbc" || Name == ".llvmcmd")
return SectionKind::getMetadata();
- if (Name.empty() || Name[0] != '.') return K;
+ if (!Name.starts_with(".")) return K;
// Default implementation based on some magic section names.
if (Name == ".bss" || Name.starts_with(".bss.") ||