TTobias Hieta[libc++] Fix GNU/Hurd build
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++] Split sources for <filesystem> The operations.cpp file contained the implementation of a ton of functionality unrelated to just the filesystem operations, and filesystem_common.h contained a lot of unrelated functionality as well. Splitting this up into more files will make it possible in the future to support parts of <filesystem> (e.g. path) on systems where there is no notion of a filesystem. Differential Revision: https://reviews.llvm.org/D152377 | 3 年前 | |
[libc++][hardening][NFC] Introduce _LIBCPP_ASSERT_UNCATEGORIZED. Replace most uses of _LIBCPP_ASSERT with _LIBCPP_ASSERT_UNCATEGORIZED. This is done as a prerequisite to introducing hardened mode to libc++. The idea is to make enabling assertions an opt-in with (somewhat) fine-grained controls over which categories of assertions are enabled. The vast majority of assertions are currently uncategorized; the new macro will allow turning on _LIBCPP_ASSERT (the underlying mechanism for all kinds of assertions) without enabling all the uncategorized assertions (in the future; this patch preserves the current behavior). Differential Revision: https://reviews.llvm.org/D153816 | 3 年前 | |
[libc++][hardening][NFC] Introduce _LIBCPP_ASSERT_UNCATEGORIZED. Replace most uses of _LIBCPP_ASSERT with _LIBCPP_ASSERT_UNCATEGORIZED. This is done as a prerequisite to introducing hardened mode to libc++. The idea is to make enabling assertions an opt-in with (somewhat) fine-grained controls over which categories of assertions are enabled. The vast majority of assertions are currently uncategorized; the new macro will allow turning on _LIBCPP_ASSERT (the underlying mechanism for all kinds of assertions) without enabling all the uncategorized assertions (in the future; this patch preserves the current behavior). Differential Revision: https://reviews.llvm.org/D153816 | 3 年前 | |
[libcxx] Migrate posix_compat.h layer to not use CRT filesystem functions. Right now, the filesystem APIs _mostly_ use Win32 API calls, but a small number of functions use CRT APIs instead. The semantics are effectively the same, except for which sorts of error codes are returned. We want to be consistent about returning only native Win32 error codes, as a prerequisite for https://reviews.llvm.org/D151493. This change switches getcwd, chdir, and mkdir. It does _not_ switch open/close, because there are difficulties around the use of C-runtime file descriptor numbers. Instead, those two APIs are removed from posix_compat.h, and the win32-specific code inlined into the operations.cpp FileDescriptor class (with a TODO comment). Reviewed By: #libc, mstorsjo, Mordante Differential Revision: https://reviews.llvm.org/D153037 | 2 年前 | |
[libc++] Fix GNU/Hurd build GNU/Hurd does have clock_gettime, it just doesn't define _POSIX_TIMERS because its support for timers is not complete. Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D158584 (cherry picked from commit 1cfcc36812ff7857567f7c729c22ae0e2be0fb3a) | 2 年前 | |
[libc++] Split sources for <filesystem> The operations.cpp file contained the implementation of a ton of functionality unrelated to just the filesystem operations, and filesystem_common.h contained a lot of unrelated functionality as well. Splitting this up into more files will make it possible in the future to support parts of <filesystem> (e.g. path) on systems where there is no notion of a filesystem. Differential Revision: https://reviews.llvm.org/D152377 | 3 年前 | |
[libc++][hardening][NFC] Introduce _LIBCPP_ASSERT_UNCATEGORIZED. Replace most uses of _LIBCPP_ASSERT with _LIBCPP_ASSERT_UNCATEGORIZED. This is done as a prerequisite to introducing hardened mode to libc++. The idea is to make enabling assertions an opt-in with (somewhat) fine-grained controls over which categories of assertions are enabled. The vast majority of assertions are currently uncategorized; the new macro will allow turning on _LIBCPP_ASSERT (the underlying mechanism for all kinds of assertions) without enabling all the uncategorized assertions (in the future; this patch preserves the current behavior). Differential Revision: https://reviews.llvm.org/D153816 | 3 年前 | |
[libc++] Merge _LIBCPP_FUNC_VIS, _LIBCPP_TYPE_VIS and _LIBCPP_EXCEPTION_ABI into _LIBCPP_EXPORTED_FROM_ABI These macros are always defined identically, so we can simplify the code a bit by merging them. Reviewed By: ldionne, #libc Spies: libcxx-commits, krytarowski, smeenai Differential Revision: https://reviews.llvm.org/D152652 | 3 年前 | |
[libc++][hardening][NFC] Introduce _LIBCPP_ASSERT_UNCATEGORIZED. Replace most uses of _LIBCPP_ASSERT with _LIBCPP_ASSERT_UNCATEGORIZED. This is done as a prerequisite to introducing hardened mode to libc++. The idea is to make enabling assertions an opt-in with (somewhat) fine-grained controls over which categories of assertions are enabled. The vast majority of assertions are currently uncategorized; the new macro will allow turning on _LIBCPP_ASSERT (the underlying mechanism for all kinds of assertions) without enabling all the uncategorized assertions (in the future; this patch preserves the current behavior). Differential Revision: https://reviews.llvm.org/D153816 | 3 年前 | |
[libc++] Split sources for <filesystem> The operations.cpp file contained the implementation of a ton of functionality unrelated to just the filesystem operations, and filesystem_common.h contained a lot of unrelated functionality as well. Splitting this up into more files will make it possible in the future to support parts of <filesystem> (e.g. path) on systems where there is no notion of a filesystem. Differential Revision: https://reviews.llvm.org/D152377 | 3 年前 | |
[libc++][filesystem] Avoid using anonymous namespaces in support headers This avoids using anonymous namespaces in headers and ensures that the various helper functions get deduplicated across the TUs implementing <filesystem>. Otherwise, we'd get a definition of these helper functions in each TU where they are used, which is entirely unnecessary. Differential Revision: https://reviews.llvm.org/D152378 | 3 年前 | |
[libcxx] Migrate posix_compat.h layer to not use CRT filesystem functions. Right now, the filesystem APIs _mostly_ use Win32 API calls, but a small number of functions use CRT APIs instead. The semantics are effectively the same, except for which sorts of error codes are returned. We want to be consistent about returning only native Win32 error codes, as a prerequisite for https://reviews.llvm.org/D151493. This change switches getcwd, chdir, and mkdir. It does _not_ switch open/close, because there are difficulties around the use of C-runtime file descriptor numbers. Instead, those two APIs are removed from posix_compat.h, and the win32-specific code inlined into the operations.cpp FileDescriptor class (with a TODO comment). Reviewed By: #libc, mstorsjo, Mordante Differential Revision: https://reviews.llvm.org/D153037 | 2 年前 | |
[libc++] Avoid including things that require a filesystem in filesytem_clock.cpp The filesystem clock implementation should be available regardless of whether a proper filesystem is available on the platform, so it makes sense to try and avoid including things that are inherently filesystem-y in the implementation of filesystem clock. Differential Revision: https://reviews.llvm.org/D154390 | 2 年前 |