1 | //===-- GPU Implementation of vfprintf ------------------------------------===// |
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/vfprintf.h" |
10 | |
11 | #include "hdr/types/FILE.h" |
12 | #include "src/__support/CPP/string_view.h" |
13 | #include "src/__support/arg_list.h" |
14 | #include "src/__support/common.h" |
15 | #include "src/stdio/gpu/vfprintf_utils.h" |
16 | |
17 | namespace LIBC_NAMESPACE_DECL { |
18 | |
19 | LLVM_LIBC_FUNCTION(int, vfprintf, |
20 | (::FILE *__restrict stream, const char *__restrict format, |
21 | va_list vlist)) { |
22 | cpp::string_view str_view(format); |
23 | int ret_val = vfprintf_internal(stream, format, str_view.size() + 1, vlist); |
24 | return ret_val; |
25 | } |
26 | |
27 | } // namespace LIBC_NAMESPACE_DECL |
28 | |