Skip to content

Commit

Permalink
Merge pull request #272 from hvdijk/starts_with
Browse files Browse the repository at this point in the history
[NFC] Change more startswith/endswith to starts_with/ends_with.
  • Loading branch information
hvdijk authored Jan 2, 2024
2 parents a29bb08 + 775e7cc commit 6102a14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/compiler/spirv-ll/include/spirv-ll/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ class Builder {
llvm::SmallVector<llvm::StringRef, 16> subs;
for (size_t nameIndex = 0; nameIndex < names.size(); nameIndex++) {
llvm::StringRef name(names[nameIndex]);
if (name.startswith("Dv")) {
if (name.starts_with("Dv")) {
auto found = std::find(subs.begin(), subs.end(), name);
if (found == subs.end()) {
subs.push_back(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static bool checkParametrizedPassName(StringRef Name, StringRef PassName) {
if (!Name.consume_front(PassName)) return false;
// normal pass name w/o parameters == default parameters
if (Name.empty()) return true;
return Name.startswith("<") && Name.endswith(">");
return Name.starts_with("<") && Name.ends_with(">");
}

inline Expected<StringRef> parseSinglePassStringRef(StringRef Params) {
Expand Down

0 comments on commit 6102a14

Please sign in to comment.