File tree Expand file tree Collapse file tree 6 files changed +10
-4
lines changed
test/libcxx/transitive_includes Expand file tree Collapse file tree 6 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 18
18
#include < __type_traits/make_unsigned.h>
19
19
#include < cstddef>
20
20
#include < cstdint>
21
- #include < cstdlib>
22
21
23
22
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
24
23
# pragma GCC system_header
Original file line number Diff line number Diff line change @@ -460,6 +460,11 @@ _LIBCPP_HARDENING_MODE_DEBUG
460
460
# define __has_constexpr_builtin (x ) 0
461
461
# endif
462
462
463
+ // This checks wheter a Clang module is built
464
+ # ifndef __building_module
465
+ # define __building_module (...) 0
466
+ # endif
467
+
463
468
// '__is_identifier' returns '0' if '__x' is a reserved identifier provided by
464
469
// the compiler and '1' otherwise.
465
470
# ifndef __is_identifier
Original file line number Diff line number Diff line change 30
30
// so libc++'s <math.h> usually absorbs atomic_wide_counter.h into the
31
31
// module with <math.h> and makes atomic_wide_counter.h invisible.
32
32
// Include <math.h> here to work around that.
33
- #include < math.h>
33
+ // This checks wheter a Clang module is built
34
+ #if __building_module(std)
35
+ # include < math.h>
36
+ #endif
34
37
35
38
#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
36
39
# pragma GCC system_header
Original file line number Diff line number Diff line change @@ -620,6 +620,7 @@ template <class T>
620
620
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
621
621
# include < cmath>
622
622
# include < compare>
623
+ # include < cstdlib>
623
624
# include < cstring>
624
625
# include < type_traits>
625
626
#endif
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ array stdexcept
30
30
array version
31
31
atomic cstddef
32
32
atomic cstdint
33
- atomic cstdlib
34
33
atomic cstring
35
34
atomic ctime
36
35
atomic limits
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ array stdexcept
30
30
array version
31
31
atomic cstddef
32
32
atomic cstdint
33
- atomic cstdlib
34
33
atomic cstring
35
34
atomic ctime
36
35
atomic limits
You can’t perform that action at this time.
0 commit comments