2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_CSTDARG
11 #define _LIBCPP_CSTDARG
18 type va_arg(va_list ap, type);
19 void va_copy(va_list dest, va_list src); // C99
20 void va_end(va_list ap);
21 void va_start(va_list ap, parmN);
34 #include <__assert> // all public C++ headers provide the assertion handler
37 // <stdarg.h> is not provided by libc++
38 #if __has_include(<stdarg.h>)
40 # ifdef _LIBCPP_STDARG_H
41 # error "If libc++ starts defining <stdarg.h>, the __has_include check should move to libc++'s <stdarg.h>"
45 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
46 # pragma GCC system_header
49 _LIBCPP_BEGIN_NAMESPACE_STD
51 using ::va_list _LIBCPP_USING_IF_EXISTS;
53 _LIBCPP_END_NAMESPACE_STD
55 #endif // _LIBCPP_CSTDARG