diff options
author | Kazu Hirata <kazu@google.com> | 2023-12-13 22:46:02 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-12-13 22:46:02 -0800 |
commit | 5c9d82de6b72cc0c037daecce452c450870f0034 (patch) | |
tree | 6df2bfa36033214406a096235985cdde220765b4 /llvm/unittests/Transforms/Utils/CloningTest.cpp | |
parent | 2255795f281862b11e22920b982d57787808ecbb (diff) | |
download | llvm-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/Transforms/Utils/CloningTest.cpp')
-rw-r--r-- | llvm/unittests/Transforms/Utils/CloningTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/unittests/Transforms/Utils/CloningTest.cpp b/llvm/unittests/Transforms/Utils/CloningTest.cpp index e083c75b..025771f 100644 --- a/llvm/unittests/Transforms/Utils/CloningTest.cpp +++ b/llvm/unittests/Transforms/Utils/CloningTest.cpp @@ -440,11 +440,11 @@ for.end: EXPECT_NE(NewLoop, nullptr); EXPECT_EQ(NewLoop->getSubLoops().size(), 1u); Loop::block_iterator BI = NewLoop->block_begin(); - EXPECT_TRUE((*BI)->getName().startswith("for.outer")); - EXPECT_TRUE((*(++BI))->getName().startswith("for.inner.preheader")); - EXPECT_TRUE((*(++BI))->getName().startswith("for.inner")); - EXPECT_TRUE((*(++BI))->getName().startswith("for.inner.exit")); - EXPECT_TRUE((*(++BI))->getName().startswith("for.outer.latch")); + EXPECT_TRUE((*BI)->getName().starts_with("for.outer")); + EXPECT_TRUE((*(++BI))->getName().starts_with("for.inner.preheader")); + EXPECT_TRUE((*(++BI))->getName().starts_with("for.inner")); + EXPECT_TRUE((*(++BI))->getName().starts_with("for.inner.exit")); + EXPECT_TRUE((*(++BI))->getName().starts_with("for.outer.latch")); }); } |