aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-06 16:47:50 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2023-11-06 16:50:18 +0000
commit3ca4fe80d44d4e62b1cd34b6312f61f07cfb3f82 (patch)
tree37f8067297b03ed20fabcb12d50d9e3ec5dc7278 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent8b3c071b6f0f20a911aa83be00f4863a30da159b (diff)
downloadllvm-3ca4fe80d44d4e62b1cd34b6312f61f07cfb3f82.zip
llvm-3ca4fe80d44d4e62b1cd34b6312f61f07cfb3f82.tar.gz
llvm-3ca4fe80d44d4e62b1cd34b6312f61f07cfb3f82.tar.bz2
[Transforms] Use StringRef::starts_with/ends_with instead of startswith/endswith. NFC.
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index d14fd09..c03d118 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -296,7 +296,7 @@ std::optional<MDNode *> llvm::makeFollowupLoopID(
StringRef AttrName = cast<MDString>(NameMD)->getString();
// Do not inherit excluded attributes.
- return !AttrName.startswith(InheritOptionsExceptPrefix);
+ return !AttrName.starts_with(InheritOptionsExceptPrefix);
};
if (InheritThisAttribute(Op))