From cc4ecfd68b79a44f101fe9924d088a83477797c0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 9 Dec 2023 14:28:45 -0800 Subject: [ADT] Rename SmallString::{starts,ends}with to {starts,ends}_with (#74916) This patch renames {starts,ends}with to {starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. Since there are only a handful of occurrences, this patch skips the deprecation phase and simply renames them. --- llvm/tools/llvm-cov/CodeCoverage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp') diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index b5d763d..c1e3e2c 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -502,7 +502,7 @@ void CodeCoverageTool::remapPathNames(const CoverageMapping &Coverage) { SmallString<128> NativeFilename; sys::path::native(Filename, NativeFilename); sys::path::remove_dots(NativeFilename, true); - if (NativeFilename.startswith(RemapFrom)) { + if (NativeFilename.starts_with(RemapFrom)) { RemappedFilenames[Filename] = RemapTo + NativeFilename.substr(RemapFrom.size()).str(); } -- cgit v1.1