1 /* ===-------- vadefs.h ---------------------------------------------------===
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 *===-----------------------------------------------------------------------===
10 /* Only include this if we are aiming for MSVC compatibility. */
12 #include_next <vadefs.h>
15 #ifndef __clang_vadefs_h
16 #define __clang_vadefs_h
18 #include_next <vadefs.h>
20 /* Override macros from vadefs.h with definitions that work with Clang. */
23 #define _crt_va_start(ap, param) __builtin_va_start(ap, param)
27 #define _crt_va_end(ap) __builtin_va_end(ap)
31 #define _crt_va_arg(ap, type) __builtin_va_arg(ap, type)
34 /* VS 2015 switched to double underscore names, which is an improvement, but now
35 * we have to intercept those names too.
39 #define __crt_va_start(ap, param) __builtin_va_start(ap, param)
43 #define __crt_va_end(ap) __builtin_va_end(ap)
47 #define __crt_va_arg(ap, type) __builtin_va_arg(ap, type)