History log of /llvm-project-15.0.7/libcxx/src/filesystem/operations.cpp (Results 1 – 25 of 54)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4
# 87a55137 05-May-2022 Brian Tracy <[email protected]>

Fix "the the" typo in documentation and user facing strings

There are many more instances of this pattern, but I chose to limit this change to .rst files (docs), anything in libcxx/include, and stri

Fix "the the" typo in documentation and user facing strings

There are many more instances of this pattern, but I chose to limit this change to .rst files (docs), anything in libcxx/include, and string literals. These have the highest chance of being seen by end users.

Reviewed By: #libc, Mordante, martong, ldionne

Differential Revision: https://reviews.llvm.org/D124708

show more ...


Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1
# 4fe6a5d6 08-Apr-2022 Gustavo Henrique Nihei <[email protected]>

[libc++] Rename PS() macro to avoid clashing with Xtensa register name

This patch addresses a clash with the PS register from Xtensa
defined in the <specreg.h> header file, which is commonly include

[libc++] Rename PS() macro to avoid clashing with Xtensa register name

This patch addresses a clash with the PS register from Xtensa
defined in the <specreg.h> header file, which is commonly included in
OS implementation.

Issue identified while building libc++ port for Apache NuttX, targeting
Xtensa-based chips (e.g. Espressif's ESP32).

Signed-off-by: Gustavo Henrique Nihei <[email protected]>

Differential Revision: https://reviews.llvm.org/D122479

show more ...


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 3906ebf7 28-Feb-2022 Konstantin Varlamov <[email protected]>

[libc++] Fix double file closing in `std::filesystem::remove_all()`.

According to Linux documentation (see e.g. https://linux.die.net/man/3/closedir):

> A successful call to `closedir()` also close

[libc++] Fix double file closing in `std::filesystem::remove_all()`.

According to Linux documentation (see e.g. https://linux.die.net/man/3/closedir):

> A successful call to `closedir()` also closes the underlying file
> descriptor associated with `dirp`.

Thus, calling `close()` after a successful call to `closedir()` is at
best redundant. Worse, should a different thread open a file in-between
the calls to `closedir()` and `close()` and get the same file descriptor,
the call to `close()` might actually close a different file than was
intended.

rdar://89251874

Differential Revision: https://reviews.llvm.org/D120453

show more ...


# f87aa19b 14-Feb-2022 Louis Dionne <[email protected]>

[libc++] Move everything related solely to _LIBCPP_ASSERT to its own file

This is the first step towards disentangling the debug mode and assertions
in libc++. This patch doesn't make any functional

[libc++] Move everything related solely to _LIBCPP_ASSERT to its own file

This is the first step towards disentangling the debug mode and assertions
in libc++. This patch doesn't make any functional change: it simply moves
_LIBCPP_ASSERT-related stuff to its own file so as to make it clear that
libc++ assertions and the debug mode are different things. Future patches
will make it possible to enable assertions without enabling the debug
mode.

Differential Revision: https://reviews.llvm.org/D119769

show more ...


# bbb0f2c7 11-Feb-2022 Arthur O'Dwyer <[email protected]>

[libc++] Replace `#include ""` with `<>` in libcxx/src/. NFCI.

Our best guess is that the two syntaxes should have exactly equivalent
effects, so, let's be consistent with what we do in libcxx/inclu

[libc++] Replace `#include ""` with `<>` in libcxx/src/. NFCI.

Our best guess is that the two syntaxes should have exactly equivalent
effects, so, let's be consistent with what we do in libcxx/include/.

I've left `#include "include/x.h"` and `#include "../y.h"` alone
because I'm less sure that they're interchangeable, and they aren't
inconsistent with libcxx/include/ because libcxx/include/ never
does that kind of thing.

Also, use the `_LIBCPP_PUSH_MACROS/POP_MACROS` dance for `<__undef_macros>`,
even though it's technically unnecessary in a standalone .cpp file,
just so we have consistently one way to do it.

Differential Revision: https://reviews.llvm.org/D119561

show more ...


# 2a8f9a5e 14-Feb-2022 Nikolas Klauser <[email protected]>

[libc++] Implement P0627R6 (Function to mark unreachable code)

Reviewed By: ldionne, Quuxplusone, #libc

Spies: arichardson, mstorsjo, libcxx-commits, mgorny

Differential Revision: https://reviews.

[libc++] Implement P0627R6 (Function to mark unreachable code)

Reviewed By: ldionne, Quuxplusone, #libc

Spies: arichardson, mstorsjo, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D119152

show more ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init
# 4f67a909 26-Jan-2022 Louis Dionne <[email protected]>

[libc++] Fix TOCTOU issue with std::filesystem::remove_all

https://bugs.chromium.org/p/llvm/issues/detail?id=19
rdar://87912416

Differential Revision: https://reviews.llvm.org/D118134


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1
# eb8650a7 17-Nov-2021 Louis Dionne <[email protected]>

[runtimes][NFC] Remove filenames at the top of the license notice

We've stopped doing it in libc++ for a while now because these names
would end up rotting as we move things around and copy/paste st

[runtimes][NFC] Remove filenames at the top of the license notice

We've stopped doing it in libc++ for a while now because these names
would end up rotting as we move things around and copy/paste stuff.
This cleans up all the existing files so as to stop the spreading
as people copy-paste headers around.

show more ...


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1
# 68e45962 09-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Fix the function name in exceptions from create_directories

If the nested create_directory call fails, we'd still want to
re-report the errors with the create_directories function name,
whi

[libcxx] Fix the function name in exceptions from create_directories

If the nested create_directory call fails, we'd still want to
re-report the errors with the create_directories function name,
which is what the caller called.

This fixes one aspect from MS STL's tests for std::filesystem.

Differential Revision: https://reviews.llvm.org/D102365

show more ...


# cb151164 23-May-2021 Joerg Sonnenberger <[email protected]>

[libc++] use more early returns for consistency

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D96983


# 0aa637b2 06-Mar-2021 Arthur O'Dwyer <[email protected]>

[libc++] Improve src/filesystem's formatting of paths.

This is my attempt to merge D98077 (bugfix the format strings for
Windows paths, which use wchar_t not char)
and D96986 (replace C++ variadic t

[libc++] Improve src/filesystem's formatting of paths.

This is my attempt to merge D98077 (bugfix the format strings for
Windows paths, which use wchar_t not char)
and D96986 (replace C++ variadic templates with C-style varargs so that
`__attribute__((format(printf)))` can be applied, for better safety)
and D98065 (remove an unused function overload).

The one intentional functional change here is in `__create_what`.
It now prints path1 and path2 in square-brackets _and_ double-quotes,
rather than just square-brackets. Prior to this patch, it would
print either path double-quoted if-and-only-if it was the empty
string. Now the double-quotes are always present. I doubt anybody's
code is relying on the current format, right?

Differential Revision: https://reviews.llvm.org/D98097

show more ...


# 29012ce9 27-Feb-2021 Martin Storsjö <[email protected]>

[libcxx] Map ERROR_BAD_PATHNAME to errc::no_such_file_or_directory on windows

Opening a path like \\server (without a trailing share name and
path) produces this error, while opening e.g. \\server\s

[libcxx] Map ERROR_BAD_PATHNAME to errc::no_such_file_or_directory on windows

Opening a path like \\server (without a trailing share name and
path) produces this error, while opening e.g. \\server\share
(for a nonexistent server/share) produces ERROR_BAD_NETPATH (which
already is mapped).

This happens in some testcases (in fs.op.proximate); as proximate()
calls weakly_canonical() on the inputs, weakly_canonical() checks
whether the path exists or not. When the error code wasn't recognized
(it mapped to errc::invalid_argument), the stat operation wasn't
conclusive and weakly_canonical() errored out. With the proper error
code mapping, this isn't considered an error, just a nonexistent
path, and weakly_canonical() can proceed.

This roughly matches what MS STL does - it doesn't have
ERROR_BAD_PATHNAME in its error code mapping table, but it
checks for this error code specifically in the return of their
correspondence of the stat function.

Differential Revision: https://reviews.llvm.org/D97619

show more ...


# 99c7b532 27-Feb-2021 Martin Storsjö <[email protected]>

[libcxx] Avoid infinite recursion in create_directories, if the root directory doesn't exist

Differential Revision: https://reviews.llvm.org/D97618


# c5e8f024 18-Dec-2020 Martin Storsjö <[email protected]>

[libcxx] Explicitly return the expected error code in create_directories if the parent isn't a directory

On windows, going ahead and actually trying to create the directory
doesn't return an error c

[libcxx] Explicitly return the expected error code in create_directories if the parent isn't a directory

On windows, going ahead and actually trying to create the directory
doesn't return an error code that maps to
std::errc::not_a_directory in this case.

This fixes two cases of
TEST_CHECK(ErrorIs(ec, std::errc::not_a_directory))
in filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
for windows (in testcases added in 59c72a70121567f7aee347e96b4ac8f3cfe9f4b2).

Differential Revision: https://reviews.llvm.org/D97090

show more ...


# c7d46f22 25-Feb-2021 Martin Storsjö <[email protected]>

[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms

This avoids having to query pathconf for a max size for
preallocating a buffer for the return value.

This is an extension t

[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms

This avoids having to query pathconf for a max size for
preallocating a buffer for the return value.

This is an extension to the POSIX getcwd() spec.

Differential Revision: https://reviews.llvm.org/D97460

show more ...


# 8c305a5d 08-Jan-2021 Martin Storsjö <[email protected]>

[libcxx] Rename a method in PathParser for clarity. NFC.

Differential Revision: https://reviews.llvm.org/D97081


# 513463fd 05-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Have lexically_normal return the path with preferred separators

Differential Revision: https://reviews.llvm.org/D91179


# a77e9180 17-Feb-2021 Joerg Sonnenberger <[email protected]>

libcxx: use early returns

Differential Revision: https://reviews.llvm.org/D96955


# 929f0bcc 03-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Implement parsing of root_name for paths on windows

Differential Revision: https://reviews.llvm.org/D91176


# d4f4e723 29-Oct-2020 Martin Storsjö <[email protected]>

[libcxx] Implement temp_directory_path using GetTempPath on windows

This does roughly the same as the manual implementation, but checks
a slightly different set of environment variables and has a mo

[libcxx] Implement temp_directory_path using GetTempPath on windows

This does roughly the same as the manual implementation, but checks
a slightly different set of environment variables and has a more
appropriate fallback if no environment variables are available
(/tmp isn't a very useful fallback on windows).

Differential Revision: https://reviews.llvm.org/D91175

show more ...


# 4d292d53 30-Oct-2020 Martin Storsjö <[email protected]>

[libcxx] Use the posix code for directory_entry::__do_refresh

This works just fine for windows, as all the functions it calls
are implemented and wrapped for windows.

Differential Revision: https:/

[libcxx] Use the posix code for directory_entry::__do_refresh

This works just fine for windows, as all the functions it calls
are implemented and wrapped for windows.

Differential Revision: https://reviews.llvm.org/D91173

show more ...


# cdc60a3b 04-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Implement the read_symlink function for windows

Differential Revision: https://reviews.llvm.org/D91172


# 40117b70 04-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Implement the permissions function for windows

Differential Revision: https://reviews.llvm.org/D91171


# 83d705ad 04-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Implement the canonical function for windows

Differential Revision: https://reviews.llvm.org/D91170


# 0c71c914 04-Nov-2020 Martin Storsjö <[email protected]>

[libcxx] Implement the current_path function for windows

Differential Revision: https://reviews.llvm.org/D91169


123