File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -968,6 +968,13 @@ def StdC : StandardSpec<"stdc"> {
968
968
RetValSpec<IntType>,
969
969
[ArgSpec<IntType>, ArgSpec<FILEPtr>]
970
970
>,
971
+ FunctionSpec<
972
+ "vsscanf",
973
+ RetValSpec<IntType>,
974
+ [ArgSpec<ConstCharPtr>,
975
+ ArgSpec<ConstCharPtr>,
976
+ ArgSpec<VaListType>]
977
+ >,
971
978
],
972
979
[
973
980
ObjectSpec<
Original file line number Diff line number Diff line change @@ -203,6 +203,16 @@ add_entrypoint_object(
203
203
libc.src.stdio.printf_core.vfprintf_internal
204
204
)
205
205
206
+ add_entrypoint_object (
207
+ vsscanf
208
+ SRCS
209
+ vsscanf.cpp
210
+ HDRS
211
+ vsscanf.h
212
+ DEPENDS
213
+ libc.src.__support.arg_list
214
+ )
215
+
206
216
add_stdio_entrypoint_object (
207
217
fileno
208
218
SRCS
Original file line number Diff line number Diff line change
1
+ // ===-- Implementation of vsscanf -------------------------------*- 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
+ #include " src/stdio/vsscanf.h"
10
+
11
+ #include " src/__support/arg_list.h"
12
+
13
+ #include < stdarg.h>
14
+
15
+ namespace LIBC_NAMESPACE {
16
+
17
+ LLVM_LIBC_FUNCTION (int , vsscanf,
18
+ (const char *, const char *,
19
+ va_list vlist)) {
20
+ internal::ArgList args (vlist); // This holder class allows for easier copying
21
+ // and pointer semantics, as well as handling
22
+ // destruction automatically.
23
+
24
+
25
+ return -1 ;
26
+ }
27
+
28
+ } // namespace LIBC_NAMESPACE
Original file line number Diff line number Diff line change
1
+ // ===-- Implementation header of vsscanf ------------------------*- 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_STDIO_VSSCANF_H
10
+ #define LLVM_LIBC_SRC_STDIO_VSSCANF_H
11
+
12
+ #include < stdarg.h>
13
+
14
+ namespace LIBC_NAMESPACE {
15
+
16
+ int vsscanf (const char * s, const char * format,
17
+ va_list vlist);
18
+
19
+ } // namespace LIBC_NAMESPACE
20
+
21
+ #endif // LLVM_LIBC_SRC_STDIO_VSSCANF_H
You can’t perform that action at this time.
0 commit comments