Skip to content

Commit 6b7957a

Browse files
committed
Fix to build with "handle noret"
1 parent d5fae5e commit 6b7957a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/ADT/StringRef.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ namespace llvm {
177177
return size() == RHS.size() && compare_insensitive(RHS) == 0;
178178
}
179179

180+
/// Check for string equality, ignoring case.
181+
[[nodiscard]] bool equals(StringRef RHS) const {
182+
return Length == RHS.Length && compare(RHS) == 0;
183+
}
184+
180185
/// compare - Compare two strings; the result is negative, zero, or positive
181186
/// if this string is lexicographically less than, equal to, or greater than
182187
/// the \p RHS.

0 commit comments

Comments
 (0)