diff options
author | Mike Rice <michael.p.rice@intel.com> | 2019-05-08 17:15:21 +0000 |
---|---|---|
committer | Mike Rice <michael.p.rice@intel.com> | 2019-05-08 17:15:21 +0000 |
commit | a0933bd8ec1515167ea653f7ee788b8bbde27d51 (patch) | |
tree | e1b73dcacfdce3d28fd9b6929fffc9d1c7979ec2 /clang/lib/Headers/stdarg.h | |
parent | f31eba649422082783a19bb6b373f31f10f55de9 (diff) | |
download | bcm5719-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.h | 5 |
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 |