Fix test failures introduced by PR #113697 (#116941)
[llvm-project.git] / libc / src / stdio / vasprintf.cpp
blob4a44d4a0f884263bad72fdbb923e620bed287e69
1 //===-- Implementation of vasprintf -----------------------------*- 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 //===----------------------------------------------------------------------===//
9 #include "src/stdio/vasprintf.h"
10 #include "src/__support/arg_list.h"
11 #include "src/stdio/printf_core/vasprintf_internal.h"
13 namespace LIBC_NAMESPACE_DECL {
15 LLVM_LIBC_FUNCTION(int, vasprintf,
16 (char **__restrict ret, const char *__restrict format,
17 va_list vlist)) {
18 internal::ArgList args(vlist); // This holder class allows for easier copying
19 // and pointer semantics, as well as handling
20 // destruction automatically.
21 return printf_core::vasprintf_internal(ret, format, args);
24 } // namespace LIBC_NAMESPACE_DECL