aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Option/OptTable.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-05-12 15:37:37 -0700
committerKazu Hirata <kazu@google.com>2023-05-12 15:37:37 -0700
commit6c3ea866e93003e16fc55d3b5cedd3bc371d1fde (patch)
tree8ec6c94db38360f206779c7a82d90fa54c17404c /llvm/lib/Option/OptTable.cpp
parent3665e2bdd1df50176670b2b14cbea0445e9c13a9 (diff)
downloadllvm-6c3ea866e93003e16fc55d3b5cedd3bc371d1fde.zip
llvm-6c3ea866e93003e16fc55d3b5cedd3bc371d1fde.tar.gz
llvm-6c3ea866e93003e16fc55d3b5cedd3bc371d1fde.tar.bz2
[llvm] Migrate {starts,ends}with_insensitive to {starts,ends}_with_insensitive (NFC)
This patch migrates uses of StringRef::{starts,ends}with_insensitive to StringRef::{starts,ends}_with_insensitive so that we can use names similar to those used in std::string_view. I'm planning to deprecate StringRef::{starts,ends}with_insensitive once the migration is complete across the code base. Differential Revision: https://reviews.llvm.org/D150426
Diffstat (limited to 'llvm/lib/Option/OptTable.cpp')
-rw-r--r--llvm/lib/Option/OptTable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Option/OptTable.cpp b/llvm/lib/Option/OptTable.cpp
index 2e289c5..5848191 100644
--- a/llvm/lib/Option/OptTable.cpp
+++ b/llvm/lib/Option/OptTable.cpp
@@ -163,7 +163,7 @@ static unsigned matchOption(const OptTable::Info *I, StringRef Str,
for (auto Prefix : I->Prefixes) {
if (Str.startswith(Prefix)) {
StringRef Rest = Str.substr(Prefix.size());
- bool Matched = IgnoreCase ? Rest.startswith_insensitive(I->Name)
+ bool Matched = IgnoreCase ? Rest.starts_with_insensitive(I->Name)
: Rest.startswith(I->Name);
if (Matched)
return Prefix.size() + StringRef(I->Name).size();