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/Frontend/OpenMPIRBuilderTest.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/Frontend/OpenMPIRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp index 193ada3..e79d0bb 100644 --- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp +++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp @@ -5821,7 +5821,7 @@ TEST_F(OpenMPIRBuilderTest, TargetRegion) { Function *KernelLaunchFunc = Call->getCalledFunction(); EXPECT_NE(KernelLaunchFunc, nullptr); StringRef FunctionName = KernelLaunchFunc->getName(); - EXPECT_TRUE(FunctionName.startswith("__tgt_target_kernel")); + EXPECT_TRUE(FunctionName.starts_with("__tgt_target_kernel")); // Check the fallback call BasicBlock *FallbackBlock = Branch->getSuccessor(0); @@ -5838,7 +5838,7 @@ TEST_F(OpenMPIRBuilderTest, TargetRegion) { Function *OutlinedFunc = FCall->getCalledFunction(); EXPECT_NE(OutlinedFunc, nullptr); StringRef FunctionName2 = OutlinedFunc->getName(); - EXPECT_TRUE(FunctionName2.startswith("__omp_offloading")); + EXPECT_TRUE(FunctionName2.starts_with("__omp_offloading")); EXPECT_FALSE(verifyModule(*M, &errs())); } |