Skip to content

Commit 3ca08ac

Browse files
sribee8mahesh-attarde
authored andcommitted
Revert "[libc] wchar string conversion functions mb to wc" (llvm#150549)
Reverts llvm#149423 Failing nullptr crash when using sanitizer
1 parent 3fb51cf commit 3ca08ac

File tree

15 files changed

+9
-967
lines changed

15 files changed

+9
-967
lines changed

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,9 +1266,6 @@ if(LLVM_LIBC_FULL_BUILD)
12661266
libc.src.wchar.mbrlen
12671267
libc.src.wchar.mbrtowc
12681268
libc.src.wchar.mbtowc
1269-
libc.src.wchar.mbstowcs
1270-
libc.src.wchar.mbsrtowcs
1271-
libc.src.wchar.mbsnrtowcs
12721269
libc.src.wchar.wcrtomb
12731270
libc.src.wchar.wctomb
12741271
libc.src.wchar.wcstombs

libc/include/wchar.yaml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,6 @@ functions:
5353
- type: wchar_t *__restrict
5454
- type: const char *__restrict
5555
- type: size_t
56-
- name: mbsnrtowcs
57-
standards:
58-
- stdc
59-
return_type: size_t
60-
arguments:
61-
- type: wchar_t *__restrict
62-
- type: const char **__restrict
63-
- type: size_t
64-
- type: size_t
65-
- type: mbstate_t *__restrict
66-
- name: mbsrtowcs
67-
standards:
68-
- stdc
69-
return_type: size_t
70-
arguments:
71-
- type: wchar_t *__restrict
72-
- type: const char **__restrict
73-
- type: size_t
74-
- type: mbstate_t *__restrict
75-
- name: mbstowcs
76-
standards:
77-
- stdc
78-
return_type: size_t
79-
arguments:
80-
- type: wchar_t *__restrict
81-
- type: const char *__restrict
82-
- type: size_t
8356
- name: mblen
8457
standards:
8558
- stdc

libc/src/__support/wchar/CMakeLists.txt

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,14 @@ add_object_library(
6060
SRCS
6161
mbrtowc.cpp
6262
DEPENDS
63-
libc.hdr.errno_macros
64-
libc.hdr.types.wchar_t
65-
libc.hdr.types.size_t
66-
libc.src.__support.common
67-
libc.src.__support.error_or
68-
libc.src.__support.macros.config
69-
.character_converter
70-
.mbstate
71-
)
72-
73-
add_header_library(
74-
mbsnrtowcs
75-
HDRS
76-
mbsnrtowcs.h
77-
DEPENDS
78-
libc.hdr.errno_macros
79-
libc.hdr.types.wchar_t
80-
libc.hdr.types.size_t
81-
libc.src.__support.common
82-
libc.src.__support.error_or
83-
libc.src.__support.macros.config
84-
libc.src.__support.macros.null_check
85-
.character_converter
86-
.mbstate
87-
.string_converter
63+
libc.hdr.errno_macros
64+
libc.hdr.types.wchar_t
65+
libc.hdr.types.size_t
66+
libc.src.__support.common
67+
libc.src.__support.error_or
68+
libc.src.__support.macros.config
69+
.character_converter
70+
.mbstate
8871
)
8972

9073
add_header_library(

libc/src/__support/wchar/mbsnrtowcs.h

Lines changed: 0 additions & 66 deletions
This file was deleted.

libc/src/wchar/CMakeLists.txt

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -169,54 +169,6 @@ add_entrypoint_object(
169169
libc.src.__support.wchar.mbstate
170170
)
171171

172-
add_entrypoint_object(
173-
mbstowcs
174-
SRCS
175-
mbstowcs.cpp
176-
HDRS
177-
mbstowcs.h
178-
DEPENDS
179-
libc.hdr.types.size_t
180-
libc.hdr.types.wchar_t
181-
libc.src.__support.common
182-
libc.src.__support.macros.config
183-
libc.src.__support.libc_errno
184-
libc.src.__support.wchar.mbstate
185-
libc.src.__support.wchar.mbsnrtowcs
186-
)
187-
188-
add_entrypoint_object(
189-
mbsrtowcs
190-
SRCS
191-
mbsrtowcs.cpp
192-
HDRS
193-
mbsrtowcs.h
194-
DEPENDS
195-
libc.hdr.types.size_t
196-
libc.hdr.types.wchar_t
197-
libc.src.__support.common
198-
libc.src.__support.macros.config
199-
libc.src.__support.libc_errno
200-
libc.src.__support.wchar.mbstate
201-
libc.src.__support.wchar.mbsnrtowcs
202-
)
203-
204-
add_entrypoint_object(
205-
mbsnrtowcs
206-
SRCS
207-
mbsnrtowcs.cpp
208-
HDRS
209-
mbsnrtowcs.h
210-
DEPENDS
211-
libc.hdr.types.size_t
212-
libc.hdr.types.wchar_t
213-
libc.src.__support.common
214-
libc.src.__support.macros.config
215-
libc.src.__support.libc_errno
216-
libc.src.__support.wchar.mbstate
217-
libc.src.__support.wchar.mbsnrtowcs
218-
)
219-
220172
add_entrypoint_object(
221173
wcstombs
222174
SRCS

libc/src/wchar/mbsnrtowcs.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

libc/src/wchar/mbsnrtowcs.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

libc/src/wchar/mbsrtowcs.cpp

Lines changed: 0 additions & 39 deletions
This file was deleted.

libc/src/wchar/mbsrtowcs.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

libc/src/wchar/mbstowcs.cpp

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)