aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ProgramTest.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/unittests/Support/ProgramTest.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/unittests/Support/ProgramTest.cpp')
-rw-r--r--llvm/unittests/Support/ProgramTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/Support/ProgramTest.cpp b/llvm/unittests/Support/ProgramTest.cpp
index ca301dc3..91dbb57 100644
--- a/llvm/unittests/Support/ProgramTest.cpp
+++ b/llvm/unittests/Support/ProgramTest.cpp
@@ -96,7 +96,7 @@ protected:
while (*EnvP != nullptr) {
auto S = prepareEnvVar(*EnvP);
- if (!StringRef(S).startswith("GTEST_"))
+ if (!StringRef(S).starts_with("GTEST_"))
EnvTable.emplace_back(S);
++EnvP;
}