Skip to content

Commit 557ddc2

Browse files
[clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (#137432)
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.
1 parent 97ec3ef commit 557ddc2

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

clang/lib/Headers/float.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@
1818
* additional definitions provided for Windows.
1919
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
2020
*
21-
* Also fall back on Darwin and AIX to allow additional definitions and
21+
* Also fall back on AIX to allow additional definitions and
2222
* implementation-defined values.
2323
*/
24-
#if (defined(__APPLE__) || defined(__MINGW32__) || defined(_MSC_VER) || \
25-
defined(_AIX)) && \
24+
#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(_AIX)) && \
2625
__STDC_HOSTED__ && __has_include_next(<float.h>)
2726

28-
/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
29-
* of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
30-
* extra indirection.
31-
*/
32-
#ifdef __APPLE__
33-
#define _FLOAT_H_
34-
#endif
35-
3627
# include_next <float.h>
3728

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

0 commit comments

Comments
 (0)