diff options
| author | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:07 -0800 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2024-01-31 23:54:07 -0800 |
| commit | 39fa304866e16f1408a0cab9437e47e4ebacf206 (patch) | |
| tree | 371c2aaa830ce6efdbc6e2e101ecb149aa0cfe73 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
| parent | e8512786fedbfa6ddba70ceddc29d7122173ba5e (diff) | |
[llvm] Use StringRef::starts_with (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index b0cdd6321a5f..2c5b0b3d0c44 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.") || |
