summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/stdarg.h
diff options
context:
space:
mode:
authorMike Rice <michael.p.rice@intel.com>2019-05-08 17:15:21 +0000
committerMike Rice <michael.p.rice@intel.com>2019-05-08 17:15:21 +0000
commita0933bd8ec1515167ea653f7ee788b8bbde27d51 (patch)
treee1b73dcacfdce3d28fd9b6929fffc9d1c7979ec2 /clang/lib/Headers/stdarg.h
parentf31eba649422082783a19bb6b373f31f10f55de9 (diff)
downloadbcm5719-llvm-a0933bd8ec1515167ea653f7ee788b8bbde27d51.tar.gz
bcm5719-llvm-a0933bd8ec1515167ea653f7ee788b8bbde27d51.zip
Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS
compatibility. This allows some applications developed with MSVC to compile with clang without any extra changes. Fixes: llvm.org/PR40789 Differential Revision: https://reviews.llvm.org/D61646 llvm-svn: 360271
Diffstat (limited to 'clang/lib/Headers/stdarg.h')
-rw-r--r--clang/lib/Headers/stdarg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Headers/stdarg.h b/clang/lib/Headers/stdarg.h
index 0bc39408c1e..97b3c082ec8 100644
--- a/clang/lib/Headers/stdarg.h
+++ b/clang/lib/Headers/stdarg.h
@@ -10,6 +10,11 @@
#ifndef __STDARG_H
#define __STDARG_H
+#if defined(_MSC_VER)
+/* Include otherwise unneeded header for MSVC compatibility. */
+#include <vcruntime.h>
+#endif
+
#ifndef _VA_LIST
typedef __builtin_va_list va_list;
#define _VA_LIST
OpenPOWER on IntegriCloud