]> granicus.if.org Git - clang/commitdiff
Intercept __crt_va_* used by MSVC "14"
authorReid Kleckner <reid@kleckner.net>
Thu, 20 Nov 2014 22:44:03 +0000 (22:44 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 20 Nov 2014 22:44:03 +0000 (22:44 +0000)
Moving further into the implementor's namespace is good, but now we have
one more name to intercept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/vadefs.h

index cb997fbf66c48e657821ffd1aae51f4b6874267c..7fe9a74e3f694779d715777f60b35184645eab87 100644 (file)
 #define _crt_va_arg(ap, type)    __builtin_va_arg(ap, type)
 #endif
 
+/* VS 2015 switched to double underscore names, which is an improvement, but now
+ * we have to intercept those names too.
+ */
+#ifdef __crt_va_start
+#undef __crt_va_start
+#define __crt_va_start(ap, param) __builtin_va_start(ap, param)
+#endif
+#ifdef __crt_va_end
+#undef __crt_va_end
+#define __crt_va_end(ap)          __builtin_va_end(ap)
+#endif
+#ifdef __crt_va_arg
+#undef __crt_va_arg
+#define __crt_va_arg(ap, type)    __builtin_va_arg(ap, type)
+#endif
+
 #endif
 #endif