r360291 - Revert Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility.
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 15:01:21 PDT 2019
Author: rnk
Date: Wed May 8 15:01:20 2019
New Revision: 360291
URL: http://llvm.org/viewvc/llvm-project?rev=360291&view=rev
Log:
Revert Include corecrt.h in stddef.h and vcruntime.h in stdarg.h to improve MS compatibility.
This reverts r360271 (git commit a0933bd8ec1515167ea653f7ee788b8bbde27d51)
There are concerns on the review that this breaks EFI builds and that
the transitive includes (sal.h) are actually heavy enough that we might
care.
Removed:
cfe/trunk/test/Headers/Inputs/
cfe/trunk/test/Headers/ms-additional-includes.cpp
Modified:
cfe/trunk/lib/Headers/stdarg.h
cfe/trunk/lib/Headers/stddef.h
cfe/trunk/test/Headers/c11.c
cfe/trunk/test/Headers/ms-null-ms-header-vs-stddef.cpp
Modified: cfe/trunk/lib/Headers/stdarg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stdarg.h?rev=360291&r1=360290&r2=360291&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stdarg.h (original)
+++ cfe/trunk/lib/Headers/stdarg.h Wed May 8 15:01:20 2019
@@ -10,11 +10,6 @@
#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
Modified: cfe/trunk/lib/Headers/stddef.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stddef.h?rev=360291&r1=360290&r2=360291&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stddef.h (original)
+++ cfe/trunk/lib/Headers/stddef.h Wed May 8 15:01:20 2019
@@ -18,12 +18,6 @@
#if !__has_feature(modules)
#define __STDDEF_H
#endif
-
-#if defined(_MSC_VER)
-/* Include otherwise unneeded header for MSVC compatibility. */
-#include <corecrt.h>
-#endif
-
#define __need_ptrdiff_t
#define __need_size_t
#define __need_wchar_t
Modified: cfe/trunk/test/Headers/c11.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/c11.c?rev=360291&r1=360290&r2=360291&view=diff
==============================================================================
--- cfe/trunk/test/Headers/c11.c (original)
+++ cfe/trunk/test/Headers/c11.c Wed May 8 15:01:20 2019
@@ -2,8 +2,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules -fmodules-cache-path=%t %s -D__STDC_WANT_LIB_EXT1__=1
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 \
-// RUN: -fms-compatibility-version=17.00 -isystem %S/Inputs/ms-crt %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 -fms-compatibility-version=17.00 %s
noreturn int f(); // expected-error 1+{{}}
Removed: cfe/trunk/test/Headers/ms-additional-includes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/ms-additional-includes.cpp?rev=360290&view=auto
==============================================================================
--- cfe/trunk/test/Headers/ms-additional-includes.cpp (original)
+++ cfe/trunk/test/Headers/ms-additional-includes.cpp (removed)
@@ -1,10 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only --show-includes -triple i686-pc-win32 \
-// RUN: -isystem %S/Inputs/ms-crt -fms-compatibility-version=17.00 %s \
-// RUN: | FileCheck %s
-
-#include <stddef.h>
-// CHECK: including file:{{.*}}stddef.h
-// CHECK: including file:{{.*}}corecrt.h
-#include <stdarg.h>
-// CHECK: including file:{{.*}}stdarg.h
-// CHECK: including file:{{.*}}vcruntime.h
Modified: cfe/trunk/test/Headers/ms-null-ms-header-vs-stddef.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/ms-null-ms-header-vs-stddef.cpp?rev=360291&r1=360290&r2=360291&view=diff
==============================================================================
--- cfe/trunk/test/Headers/ms-null-ms-header-vs-stddef.cpp (original)
+++ cfe/trunk/test/Headers/ms-null-ms-header-vs-stddef.cpp Wed May 8 15:01:20 2019
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility \
-// RUN: -isystem %S/Inputs/ms-crt -fms-compatibility-version=17.00 %s
+// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility -fms-compatibility-version=17.00 %s
// RUN: %clang_cc1 -fsyntax-only -triple i386-mingw32 %s
// Something in MSVC's headers (pulled in e.g. by <crtdefs.h>) defines __null
More information about the cfe-commits
mailing list