brintos

brintos / llvm-project-archived public Read only

0
0
Text · 865 B · 65f5dbf Raw
26 lines · cpp
1//===-- GPU Implementation of vprintf -------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "src/stdio/vprintf.h"10 11#include "src/__support/CPP/string_view.h"12#include "src/__support/arg_list.h"13#include "src/__support/common.h"14#include "src/stdio/gpu/vfprintf_utils.h"15 16namespace LIBC_NAMESPACE_DECL {17 18LLVM_LIBC_FUNCTION(int, vprintf,19                   (const char *__restrict format, va_list vlist)) {20  cpp::string_view str_view(format);21  int ret_val = vfprintf_internal(stdout, format, str_view.size() + 1, vlist);22  return ret_val;23}24 25} // namespace LIBC_NAMESPACE_DECL26