diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2023-11-03 17:52:51 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2023-11-03 17:53:56 +0000 |
| commit | 141122ece3c09a2f2e3c0280687633820bf632d5 (patch) | |
| tree | d01b84979bab6bbfd97143966853ea633cfa6105 /llvm/utils/TableGen/CallingConvEmitter.cpp | |
| parent | 7c93452e174dd182c36471bc1e8272f26c0ae6db (diff) | |
[TableGen] 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/utils/TableGen/CallingConvEmitter.cpp')
| -rw-r--r-- | llvm/utils/TableGen/CallingConvEmitter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp index de3810b2e227..06670e84d857 100644 --- a/llvm/utils/TableGen/CallingConvEmitter.cpp +++ b/llvm/utils/TableGen/CallingConvEmitter.cpp @@ -106,12 +106,12 @@ void CallingConvEmitter::EmitCallingConv(Record *CC, raw_ostream &O) { // Emit all of the actions, in order. for (unsigned i = 0, e = CCActions->size(); i != e; ++i) { Record *Action = CCActions->getElementAsRecord(i); - SwiftAction = llvm::any_of(Action->getSuperClasses(), - [](const std::pair<Record *, SMRange> &Class) { - std::string Name = - Class.first->getNameInitAsString(); - return StringRef(Name).startswith("CCIfSwift"); - }); + SwiftAction = + llvm::any_of(Action->getSuperClasses(), + [](const std::pair<Record *, SMRange> &Class) { + std::string Name = Class.first->getNameInitAsString(); + return StringRef(Name).starts_with("CCIfSwift"); + }); O << "\n"; EmitAction(Action, 2, O); |
