aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp71
1 files changed, 65 insertions, 6 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp b/contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp
index b18d49dbafb0..e8c24db38915 100644
--- a/contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/UnicodeCaseFold.cpp
@@ -2,11 +2,11 @@
//
// This file was generated by utils/unicode-case-fold.py from the Unicode
// case folding database at
-// http://www.unicode.org/Public/9.0.0/ucd/CaseFolding.txt
+// http://www.unicode.org/Public/15.0.0/ucd/CaseFolding.txt
//
// To regenerate this file, run:
// utils/unicode-case-fold.py \
-// "http://www.unicode.org/Public/9.0.0/ucd/CaseFolding.txt" \
+// "http://www.unicode.org/Public/15.0.0/ucd/CaseFolding.txt" \
// > lib/Support/UnicodeCaseFold.cpp
//
//===----------------------------------------------------------------------===//
@@ -411,6 +411,16 @@ int llvm::sys::unicode::foldCharSimple(int C) {
// CYRILLIC SMALL LETTER UNBLENDED UK
if (C == 0x1c88)
return 0xa64b;
+ if (C < 0x1c90)
+ return C;
+ // 43 characters
+ if (C <= 0x1cba)
+ return C + -3008;
+ if (C < 0x1cbd)
+ return C;
+ // 3 characters
+ if (C <= 0x1cbf)
+ return C + -3008;
if (C < 0x1e00)
return C;
// 75 characters
@@ -564,8 +574,8 @@ int llvm::sys::unicode::foldCharSimple(int C) {
return C + 26;
if (C < 0x2c00)
return C;
- // 47 characters
- if (C <= 0x2c2e)
+ // 48 characters
+ if (C <= 0x2c2f)
return C + 48;
// LATIN CAPITAL LETTER L WITH DOUBLE BAR
if (C == 0x2c60)
@@ -699,9 +709,33 @@ int llvm::sys::unicode::foldCharSimple(int C) {
return 0xab53;
if (C < 0xa7b4)
return C;
- // 2 characters
- if (C <= 0xa7b6)
+ // 8 characters
+ if (C <= 0xa7c2)
return C | 1;
+ // LATIN CAPITAL LETTER C WITH PALATAL HOOK
+ if (C == 0xa7c4)
+ return 0xa794;
+ // LATIN CAPITAL LETTER S WITH HOOK
+ if (C == 0xa7c5)
+ return 0x0282;
+ // LATIN CAPITAL LETTER Z WITH PALATAL HOOK
+ if (C == 0xa7c6)
+ return 0x1d8e;
+ if (C < 0xa7c7)
+ return C;
+ // 2 characters
+ if (C <= 0xa7c9 && C % 2 == 1)
+ return C + 1;
+ if (C < 0xa7d0)
+ return C;
+ // 2 characters
+ if (C <= 0xa7d6 && C % 6 == 0)
+ return C + 1;
+ if (C < 0xa7d8)
+ return C;
+ // 2 characters
+ if (C <= 0xa7f5 && C % 29 == 19)
+ return C + 1;
if (C < 0xab70)
return C;
// 80 characters
@@ -722,6 +756,26 @@ int llvm::sys::unicode::foldCharSimple(int C) {
// 36 characters
if (C <= 0x104d3)
return C + 40;
+ if (C < 0x10570)
+ return C;
+ // 11 characters
+ if (C <= 0x1057a)
+ return C + 39;
+ if (C < 0x1057c)
+ return C;
+ // 15 characters
+ if (C <= 0x1058a)
+ return C + 39;
+ if (C < 0x1058c)
+ return C;
+ // 7 characters
+ if (C <= 0x10592)
+ return C + 39;
+ if (C < 0x10594)
+ return C;
+ // 2 characters
+ if (C <= 0x10595)
+ return C + 39;
if (C < 0x10c80)
return C;
// 51 characters
@@ -732,6 +786,11 @@ int llvm::sys::unicode::foldCharSimple(int C) {
// 32 characters
if (C <= 0x118bf)
return C + 32;
+ if (C < 0x16e40)
+ return C;
+ // 32 characters
+ if (C <= 0x16e5f)
+ return C + 32;
if (C < 0x1e900)
return C;
// 34 characters