File tree Expand file tree Collapse file tree 9 files changed +70
-1
lines changed Expand file tree Collapse file tree 9 files changed +70
-1
lines changed Original file line number Diff line number Diff line change @@ -85,5 +85,10 @@ def TimeAPI : PublicAPI<"time.h"> {
85
85
}
86
86
87
87
def UCharAPI : PublicAPI<"uchar.h"> {
88
- let Types = ["mbstate_t"];
88
+ let Types = [
89
+ "mbstate_t",
90
+ "char8_t",
91
+ "char16_t",
92
+ "char32_t",
93
+ ];
89
94
}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ set(TARGET_PUBLIC_HEADERS
29
29
libc.include.time
30
30
libc.include.unistd
31
31
libc.include.wchar
32
+ libc.include.uchar
32
33
33
34
libc.include.arpa_inet
34
35
Original file line number Diff line number Diff line change @@ -603,6 +603,9 @@ add_gen_header(
603
603
DEPENDS
604
604
.llvm_libc_common_h
605
605
.llvm-libc-types.mbstate_t
606
+ .llvm-libc-types.char8_t
607
+ .llvm-libc-types.char16_t
608
+ .llvm-libc-types.char32_t
606
609
)
607
610
608
611
add_gen_header (
Original file line number Diff line number Diff line change @@ -90,6 +90,9 @@ add_header(tcflag_t HDR tcflag_t.h)
90
90
add_header (struct_termios HDR struct_termios.h DEPENDS .cc_t .speed_t .tcflag_t )
91
91
add_header (__getoptargv_t HDR __getoptargv_t.h )
92
92
add_header (wchar_t HDR wchar_t.h )
93
+ add_header (char8_t HDR char8_t.h )
94
+ add_header (char16_t HDR char16_t.h )
95
+ add_header (char32_t HDR char32_t.h )
93
96
add_header (wint_t HDR wint_t.h )
94
97
add_header (sa_family_t HDR sa_family_t.h )
95
98
add_header (socklen_t HDR socklen_t.h )
Original file line number Diff line number Diff line change
1
+ //===-- Definition of clock_t type ----------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef LLVM_LIBC_TYPES_CHAR8_T_H
10
+ #define LLVM_LIBC_TYPES_CHAR8_T_H
11
+
12
+ #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201112L
13
+ #include <stdint.h>
14
+ typedef uint_least16_t char16_t ;
15
+ #endif
16
+
17
+ #endif // LLVM_LIBC_TYPES_CHAR8_T_H
Original file line number Diff line number Diff line change
1
+ //===-- Definition of clock_t type ----------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef LLVM_LIBC_TYPES_CHAR8_T_H
10
+ #define LLVM_LIBC_TYPES_CHAR8_T_H
11
+
12
+ #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201112L
13
+ #include <stdint.h>
14
+ typedef uint_least32_t char32_t ;
15
+ #endif
16
+
17
+ #endif // LLVM_LIBC_TYPES_CHAR8_T_H
Original file line number Diff line number Diff line change
1
+ //===-- Definition of clock_t type ----------------------------------------===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+
9
+ #ifndef LLVM_LIBC_TYPES_CHAR8_T_H
10
+ #define LLVM_LIBC_TYPES_CHAR8_T_H
11
+
12
+ #if !defined(__cplusplus ) && defined(__STDC_VERSION__ ) && \
13
+ __STDC_VERSION__ >= 202311L
14
+ typedef unsigned char char8_t ;
15
+ #endif
16
+
17
+ #endif // LLVM_LIBC_TYPES_CHAR8_T_H
Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ def SizeTType : NamedType<"size_t">;
65
65
def SizeTPtr : PtrType<SizeTType>;
66
66
def RestrictedSizeTPtr : RestrictedPtrType<SizeTType>;
67
67
68
+ def Char8TType : NamedType<"char8_t">;
69
+ def Char16TType : NamedType<"char16_t">;
70
+ def Char32TType : NamedType<"char32_t">;
68
71
def WCharType : NamedType<"wchar_t">;
69
72
def WIntType : NamedType<"wint_t">;
70
73
Original file line number Diff line number Diff line change @@ -1396,6 +1396,9 @@ def StdC : StandardSpec<"stdc"> {
1396
1396
[], // Macros
1397
1397
[ //Types
1398
1398
MBStateTType,
1399
+ Char8TType,
1400
+ Char16TType,
1401
+ Char32TType,
1399
1402
],
1400
1403
[], // Enumerations
1401
1404
[]
You can’t perform that action at this time.
0 commit comments