[libc] add basic wide char functions
authorMichael Jones <michaelrj@google.com>
Mon, 13 Mar 2023 22:30:36 +0000 (15:30 -0700)
committerMichael Jones <michaelrj@google.com>
Mon, 20 Mar 2023 23:36:21 +0000 (16:36 -0700)
commit46b5087227246c9f89569af3a96126d85c87bbc4
treec69b8cd2ef24092c8855da34c0953d8ce5df6a98
parentc600b99e5ee6e63a062342fe0b9c00e4b4d8ece4
[libc] add basic wide char functions

This patch adds the wchar header, as well as the functions to convert to
and from wide chars. The header also sets up the definitions for wint
and wchar.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D145995
25 files changed:
libc/config/linux/api.td
libc/config/linux/x86_64/entrypoints.txt
libc/config/linux/x86_64/headers.txt
libc/include/CMakeLists.txt
libc/include/llvm-libc-macros/CMakeLists.txt
libc/include/llvm-libc-macros/wchar-macros.h [new file with mode: 0644]
libc/include/llvm-libc-types/CMakeLists.txt
libc/include/llvm-libc-types/size_t.h
libc/include/llvm-libc-types/wchar_t.h [new file with mode: 0644]
libc/include/llvm-libc-types/wint_t.h [new file with mode: 0644]
libc/include/wchar.h.def [new file with mode: 0644]
libc/spec/spec.td
libc/spec/stdc.td
libc/src/CMakeLists.txt
libc/src/__support/CMakeLists.txt
libc/src/__support/wctype_utils.h [new file with mode: 0644]
libc/src/wchar/CMakeLists.txt [new file with mode: 0644]
libc/src/wchar/btowc.cpp [new file with mode: 0644]
libc/src/wchar/btowc.h [new file with mode: 0644]
libc/src/wchar/wctob.cpp [new file with mode: 0644]
libc/src/wchar/wctob.h [new file with mode: 0644]
libc/test/src/CMakeLists.txt
libc/test/src/wchar/CMakeLists.txt [new file with mode: 0644]
libc/test/src/wchar/btowc_test.cpp [new file with mode: 0644]
libc/test/src/wchar/wctob_test.cpp [new file with mode: 0644]