File tree Expand file tree Collapse file tree 8 files changed +94
-0
lines changed Expand file tree Collapse file tree 8 files changed +94
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,9 @@ set(TARGET_LIBC_ENTRYPOINTS
278278 libc.src.wchar.wcslen
279279 libc.src.wchar.wctob
280280
281+ # wctype.h entrypoints
282+ libc.src.wctype.iswalpha
283+
281284 # internal entrypoints
282285 libc.startup.baremetal.init
283286 libc.startup.baremetal.fini
Original file line number Diff line number Diff line change @@ -720,6 +720,15 @@ add_header_macro(
720720 .llvm-libc-types.wchar_t
721721)
722722
723+ add_header_macro(
724+ wctype
725+ ../libc/include /wctype.yaml
726+ wctype.h
727+ DEPENDS
728+ .llvm_libc_common_h
729+ .llvm-libc-types.wint_t
730+ )
731+
723732add_header_macro(
724733 locale
725734 ../libc/include /locale.yaml
Original file line number Diff line number Diff line change 1+ //===-- C standard library header network.h -------------------------------===//
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_WCTYPE_H
10+ #define LLVM_LIBC_WCTYPE_H
11+
12+ #include "__llvm-libc-common.h"
13+
14+ %%public_api()
15+
16+ #endif // LLVM_LIBC_WCTYPE_H
Original file line number Diff line number Diff line change 1+ header : wctype.h
2+ header_template : wctype.h.def
3+ macros : []
4+ types :
5+ - type_name : wint_t
6+ enums : []
7+ objects : []
8+ functions :
9+ - name : iswalpha
10+ standards :
11+ - stdc
12+ return_type : int
13+ arguments :
14+ - type : wint_t
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ add_subdirectory(strings)
1717add_subdirectory (time)
1818add_subdirectory (unistd)
1919add_subdirectory (wchar)
20+ add_subdirectory (wctype)
2021
2122if (${LIBC_TARGET_OS} STREQUAL "linux" )
2223 add_subdirectory (dirent)
Original file line number Diff line number Diff line change 1+ add_entrypoint_object(
2+ iswalpha
3+ SRCS
4+ iswalpha.cpp
5+ HDRS
6+ iswalpha.h
7+ DEPENDS
8+ libc.src.__support.wctype_utils
9+ )
Original file line number Diff line number Diff line change 1+ // ===-- Implementation of wctob -------------------------------------------===//
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+ #include " src/wctype/iswalpha.h"
10+ #include " src/__support/common.h"
11+ #include " src/__support/wctype_utils.h"
12+
13+ #include " hdr/types/wint_t.h"
14+
15+ namespace LIBC_NAMESPACE_DECL {
16+
17+ LLVM_LIBC_FUNCTION (bool , iswalpha, (wint_t c)) {
18+ return internal::iswalpha (c);
19+ }
20+
21+ } // namespace LIBC_NAMESPACE_DECL
Original file line number Diff line number Diff line change 1+ // ===-- Implementation header for iswalpha ----------------------*- C++ -*-===//
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_SRC_WCHAR_WCTOB_H
10+ #define LLVM_LIBC_SRC_WCHAR_WCTOB_H
11+
12+ #include " hdr/types/wint_t.h"
13+ #include " src/__support/common.h"
14+
15+ namespace LIBC_NAMESPACE_DECL {
16+
17+ bool iswalpha (wint_t c);
18+
19+ } // namespace LIBC_NAMESPACE_DECL
20+
21+ #endif // LLVM_LIBC_SRC_WCHAR_WCTOB_H
You can’t perform that action at this time.
0 commit comments