[libc] Build fixes for widechar characterconverter (#143805)

Build fixes for wchar CharacterConverter class
This commit is contained in:
Uzair Nawaz
2025-06-12 17:34:45 +00:00
committed by GitHub
parent d1ca8d891f
commit 6311f039b2
6 changed files with 32 additions and 3 deletions

View File

@@ -221,6 +221,8 @@ add_proxy_header_library(
add_header_library(wchar_overlay HDRS wchar_overlay.h)
add_header_library(uchar_overlay HDRS uchar_overlay.h)
add_proxy_header_library(
wchar_macros
HDRS

View File

@@ -1,3 +1,25 @@
add_proxy_header_library(
char8_t
HDRS
char8_t.h
DEPENDS
libc.hdr.uchar_overlay
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.char8_t
libc.include.uchar
)
add_proxy_header_library(
char32_t
HDRS
char32_t.h
DEPENDS
libc.hdr.uchar_overlay
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.char32_t
libc.include.uchar
)
add_proxy_header_library(
div_t
HDRS

View File

@@ -9,8 +9,7 @@
#ifndef LLVM_LIBC_TYPES_CHAR8_T_H
#define LLVM_LIBC_TYPES_CHAR8_T_H
#if !defined(__cplusplus) && defined(__STDC_VERSION__) && \
__STDC_VERSION__ >= 202311L
#if !(defined(__cplusplus) && defined(__cpp_char8_t))
typedef unsigned char char8_t;
#endif

View File

@@ -391,4 +391,6 @@ add_subdirectory(fixed_point)
add_subdirectory(time)
add_subdirectory(wchar)
add_subdirectory(math)

View File

@@ -10,6 +10,7 @@
#define LLVM_LIBC_SRC___SUPPORT_MBSTATE_H
#include "hdr/types/char32_t.h"
#include "src/__support/common.h"
#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {

View File

@@ -9,13 +9,16 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_UTF_RET_H
#define LLVM_LIBC_SRC___SUPPORT_UTF_RET_H
namespace LIBC_NAMESPACE_DECL {
#include "src/__support/common.h"
namespace LIBC_NAMESPACE_DECL {
namespace internal {
template <typename T> struct utf_ret {
T out;
int error;
};
} // namespace internal
} // namespace LIBC_NAMESPACE_DECL
#endif // LLVM_LIBC_SRC___SUPPORT_UTF_RET_H