aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.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/DebugInfo/LogicalView/CodeViewReaderTest.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/DebugInfo/LogicalView/CodeViewReaderTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp b/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
index eb9477e..125bc17 100644
--- a/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/CodeViewReaderTest.cpp
@@ -73,7 +73,7 @@ void checkElementPropertiesClangCodeview(LVReader *Reader) {
EXPECT_EQ(Root->getName(), CodeViewClang);
EXPECT_EQ(CompileUnit->getBaseAddress(), 0u);
- EXPECT_TRUE(CompileUnit->getProducer().startswith("clang"));
+ EXPECT_TRUE(CompileUnit->getProducer().starts_with("clang"));
EXPECT_EQ(CompileUnit->getName(), "test.cpp");
EXPECT_EQ(Function->lineCount(), 16u);
@@ -139,7 +139,7 @@ void checkElementPropertiesMsvcCodeview(LVReader *Reader) {
EXPECT_EQ(Root->getName(), CodeViewMsvc);
EXPECT_EQ(CompileUnit->getBaseAddress(), 0u);
- EXPECT_TRUE(CompileUnit->getProducer().startswith("Microsoft"));
+ EXPECT_TRUE(CompileUnit->getProducer().starts_with("Microsoft"));
EXPECT_EQ(CompileUnit->getName(), "test.cpp");
EXPECT_EQ(Function->lineCount(), 14u);
@@ -205,7 +205,7 @@ void checkElementPropertiesMsvcCodeviewPdb(LVReader *Reader) {
EXPECT_EQ(Root->getName(), CodeViewPdbMsvc);
EXPECT_EQ(CompileUnit->getBaseAddress(), 0u);
- EXPECT_TRUE(CompileUnit->getProducer().startswith("Microsoft"));
+ EXPECT_TRUE(CompileUnit->getProducer().starts_with("Microsoft"));
EXPECT_EQ(CompileUnit->getName(), "test.cpp");
EXPECT_EQ(Function->lineCount(), 14u);