[llvm] d11c454 - [Support] Use StringRef::contains_insensitive (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 18:27:49 PDT 2023
Author: Kazu Hirata
Date: 2023-10-18T18:27:43-07:00
New Revision: d11c4542d8828f68a49a07c126f213ccc8bec17a
URL: https://github.com/llvm/llvm-project/commit/d11c4542d8828f68a49a07c126f213ccc8bec17a
DIFF: https://github.com/llvm/llvm-project/commit/d11c4542d8828f68a49a07c126f213ccc8bec17a.diff
LOG: [Support] Use StringRef::contains_insensitive (NFC)
Added:
Modified:
llvm/lib/Support/UnicodeNameToCodepoint.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/UnicodeNameToCodepoint.cpp b/llvm/lib/Support/UnicodeNameToCodepoint.cpp
index 0f77ff099cb17c4..a09b3ffc4cdcfb8 100644
--- a/llvm/lib/Support/UnicodeNameToCodepoint.cpp
+++ b/llvm/lib/Support/UnicodeNameToCodepoint.cpp
@@ -387,8 +387,7 @@ static std::optional<char32_t> nameToCodepoint(StringRef Name, bool Strict,
std::reverse(Buffer.begin(), Buffer.end());
// UAX44-LM2. Ignore case, whitespace, underscore ('_'), and all medial
// hyphens except the hyphen in U+1180 HANGUL JUNGSEONG O-E.
- if (!Strict && Value == 0x116c &&
- Name.find_insensitive("O-E") != StringRef::npos) {
+ if (!Strict && Value == 0x116c && Name.contains_insensitive("O-E")) {
Buffer = "HANGUL JUNGSEONG O-E";
Value = 0x1180;
}
More information about the llvm-commits
mailing list