This adds the sprintf entrypoint, as well as unit tests. Currently sprintf only supports %%, %s, and %c, but the other conversions are on the way. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D125573
19 lines
615 B
C++
19 lines
615 B
C++
//===-- Implementation header of sprintf ------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIBC_SRC_STDIO_SPRINTF_H
|
|
#define LLVM_LIBC_SRC_STDIO_SPRINTF_H
|
|
|
|
namespace __llvm_libc {
|
|
|
|
int sprintf(char *__restrict buffer, const char *__restrict format, ...);
|
|
|
|
} // namespace __llvm_libc
|
|
|
|
#endif // LLVM_LIBC_SRC_STDIO_SPRINTF_H
|