Skip to content

Commit 8d19477

Browse files
ian-twilightcodercyndyishida
authored andcommitted
[swift/release/6.2][clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency
float.h doesn't define anything in Apple's SDKs that the clang float.h doesn't undefine, so all the include_next does is add an unnecessary module dependency. Skip the include_next and completely shadow the SDK header. rdar://150062938
1 parent d3ef542 commit 8d19477

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

clang/lib/Headers/float.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,10 @@
1717
/* On various platforms, fall back to the system's float.h, which might have
1818
* additional definitions and/or implementation-defined values.
1919
*/
20-
#if (defined(__APPLE__) || defined(__MINGW32__) || defined(_MSC_VER) || \
21-
defined(_AIX) || defined(__musl__)) && \
20+
#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(_AIX) || \
21+
defined(__musl__)) && \
2222
__STDC_HOSTED__ && __has_include_next(<float.h>)
2323

24-
/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
25-
* of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
26-
* extra indirection.
27-
*/
28-
#ifdef __APPLE__
29-
#define _FLOAT_H_
30-
#endif
31-
3224
# include_next <float.h>
3325

3426
/* Undefine anything that we'll be redefining below. */

0 commit comments

Comments
 (0)