[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / lib / Headers / __stdarg_va_arg.h
blob89bd2f65d3bea2c8bd3142254171e3353a587368
1 /*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------===
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
7 *===-----------------------------------------------------------------------===
8 */
10 #ifndef va_arg
12 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
13 /* C23 does not require the second parameter for va_start. */
14 #define va_start(ap, ...) __builtin_va_start(ap, 0)
15 #else
16 /* Versions before C23 do require the second parameter. */
17 #define va_start(ap, param) __builtin_va_start(ap, param)
18 #endif
19 #define va_end(ap) __builtin_va_end(ap)
20 #define va_arg(ap, type) __builtin_va_arg(ap, type)
22 #endif