Skip to content

Commit 769c6a9

Browse files
authored
[libc++] Fix missing #includes (#130536)
Adds missing includes that were detected when I tried to build libc++ as a module. Working towards #127012
1 parent 5e94e26 commit 769c6a9

15 files changed

+24
-0
lines changed

libcxx/src/call_once.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include <__config>
910
#include <__mutex/once_flag.h>
1011
#include <__utility/exception_guard.h>
1112

libcxx/src/condition_variable.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
//===----------------------------------------------------------------------===//
88

99
#include <condition_variable>
10+
#include <limits>
11+
#include <ratio>
1012
#include <thread>
13+
#include <__chrono/duration.h>
14+
#include <__chrono/system_clock.h>
15+
#include <__chrono/time_point.h>
16+
#include <__system_error/throw_system_error.h>
1117

1218
#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
1319
# pragma comment(lib, "pthread")

libcxx/src/filesystem/directory_iterator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <__assert>
1010
#include <__config>
11+
#include <__memory/shared_ptr.h>
1112
#include <errno.h>
1213
#include <filesystem>
1314
#include <stack>

libcxx/src/filesystem/error.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define FILESYSTEM_ERROR_H
1111

1212
#include <__assert>
13+
#include <__chrono/time_point.h>
1314
#include <__config>
1415
#include <cerrno>
1516
#include <cstdarg>

libcxx/src/filesystem/filesystem_clock.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
#include <__config>
1010
#include <__system_error/throw_system_error.h>
11+
#include <cerrno>
1112
#include <chrono>
1213
#include <filesystem>
14+
#include <ratio>
1315
#include <time.h>
1416

1517
#if defined(_LIBCPP_WIN32API)

libcxx/src/filesystem/filesystem_error.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include <__config>
10+
#include <__memory/shared_ptr.h>
1011
#include <__utility/unreachable.h>
1112
#include <filesystem>
1213
#include <system_error>

libcxx/src/filesystem/operations.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include <__algorithm/copy.h>
910
#include <__assert>
1011
#include <__config>
1112
#include <__utility/unreachable.h>

libcxx/src/include/ryu/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
#include <__assert>
4646
#include <__config>
47+
#include <cstdint>
4748
#include <cstring>
4849

4950
_LIBCPP_BEGIN_NAMESPACE_STD

libcxx/src/memory.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# define _LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS
1212
#endif
1313

14+
#include <__functional/hash.h>
1415
#include <memory>
16+
#include <typeinfo>
1517

1618
#if _LIBCPP_HAS_THREADS
1719
# include <mutex>

libcxx/src/mutex.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include <__assert>
10+
#include <__system_error/throw_system_error.h>
1011
#include <__thread/id.h>
1112
#include <__utility/exception_guard.h>
1213
#include <limits>

0 commit comments

Comments
 (0)