aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLLexer.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-12-13 22:46:02 -0800
committerKazu Hirata <kazu@google.com>2023-12-13 22:46:02 -0800
commit5c9d82de6b72cc0c037daecce452c450870f0034 (patch)
tree6df2bfa36033214406a096235985cdde220765b4 /llvm/lib/AsmParser/LLLexer.cpp
parent2255795f281862b11e22920b982d57787808ecbb (diff)
downloadllvm-5c9d82de6b72cc0c037daecce452c450870f0034.zip
llvm-5c9d82de6b72cc0c037daecce452c450870f0034.tar.gz
llvm-5c9d82de6b72cc0c037daecce452c450870f0034.tar.bz2
[llvm] Use StringRef::{starts,ends}_with (NFC)
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
Diffstat (limited to 'llvm/lib/AsmParser/LLLexer.cpp')
-rw-r--r--llvm/lib/AsmParser/LLLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index fcb25f5..c8da3ef 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -906,7 +906,7 @@ lltok::Kind LLLexer::LexIdentifier() {
#define DWKEYWORD(TYPE, TOKEN) \
do { \
- if (Keyword.startswith("DW_" #TYPE "_")) { \
+ if (Keyword.starts_with("DW_" #TYPE "_")) { \
StrVal.assign(Keyword.begin(), Keyword.end()); \
return lltok::TOKEN; \
} \