SuccessChanges

Summary

  1. [PM] Show the pass argument in pre/post-pass IR dumps (details)
  2. [libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char* (details)
  3. [libcxx] [test] Ifdef out uses of create_fifo on windows (details)
  4. [libcxx] [cmake] Add asm to the runtimes build languages (details)
  5. [libcxx] [test] Add a MinGW target (details)
  6. [libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms (details)
  7. Fix constructor declarations that are invalid in C++20 onwards. (details)
Commit 3573a90b8aec082b8d7a1e2fc35f7103a0df7cb6 by nguillemot
[PM] Show the pass argument in pre/post-pass IR dumps

This patch adds each pass' pass argument in the header for IR dumps.
For example:

Before:

```
    *** IR Dump Before InstructionSelect ***
```

After:

```
    *** IR Dump Before InstructionSelect (instruction-select) ***
```

The goal is to make it easier to know what argument to pass to
command line options like `debug-only` or `run-pass` to further
investigate a given pass.
The file was modifiedllvm/test/CodeGen/SystemZ/frame-26.mir (diff)
The file was modifiedllvm/lib/IR/LegacyPassManager.cpp (diff)
The file was modifiedllvm/test/Transforms/Inline/null-function.ll (diff)
The file was modifiedclang/test/Misc/pr32207.c (diff)
Commit f15377084c3094ad47eca8738f15d397f558df7b by martin
[libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char*

On Windows, path::value_type is wchar_t, so one can't pass the return
value of path::c_str() directly to std::remove().

This matches what was done for tests under std/input.output/filesystems
in 81db3c31aafec72f1cfec2a9da4381ece7f97a29 and
3784bdf2176f38cc30134fab776efb43506c0c54.

Differential Revision: https://reviews.llvm.org/D97458
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp (diff)
Commit 3be7968c36c313b0de1baca0a87be2b98cb7f7c1 by martin
[libcxx] [test] Ifdef out uses of create_fifo on windows

Restructure code in directory_entry.obs/file_type_obs.pass.cpp
and directory_entry.obs/hard_link_count.pass.cpp to reduce the
amount of ifdeffery needed.

In file_type_obs.pass.cpp, we can't inline the calls to
env.create_* into the lambda calls (e.g. "test_path(env.create_*())"),
because the lambda removes the referenced file, and the hardlink
must be created while the earlier test file exists.

In hard_link_count.pass.cpp, move restoration of the original
directory permissions to the end of the lambda, so that new
directory entries can be created after the lambda has run once.

Differential Revision: https://reviews.llvm.org/D89948
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp (diff)
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp (diff)
Commit 72fe14d40a527465deb76c9b2241297635fd45bf by martin
[libcxx] [cmake] Add asm to the runtimes build languages

This fixes building libunwind with a new enough version of cmake.

(libunwind treats its asm sources as C depending on the cmake version
on some platforms; this fixes builds when such workarounds aren't used,
when cmake treats asm correctly on its own.)

Differential Revision: https://reviews.llvm.org/D97399
The file was modifiedlibcxx/utils/ci/runtimes/CMakeLists.txt (diff)
Commit fb2e4f5401d3ec2507ac3b2c4f86d4bfa07c01ec by martin
[libcxx] [test] Add a MinGW target

This can't easily be autodetected (unless LIBCXX_TARGET_TRIPLE is
specified, or unless we query what the compiler's default target is,
which only is supported by clang), but can be chosen manually via
LIBCXX_TARGET_INFO.

This chooses mingw style lib naming, and uses -nostdlibc++ instead
of -nodefaultlib -nostdlib (as the latter requires specifying a lot of
details manually - this is done in the cmake config though).

Differential Revision: https://reviews.llvm.org/D97294
The file was modifiedlibcxx/utils/libcxx/test/config.py (diff)
The file was modifiedlibcxx/utils/libcxx/test/target_info.py (diff)
Commit c7d46f221e829411b0f0dec41409ed626646cdd2 by martin
[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
The file was modifiedlibcxx/src/filesystem/operations.cpp (diff)
Commit 95d0d8e9e9d10da3cfa503fbba405e740aea3cc1 by richard
Fix constructor declarations that are invalid in C++20 onwards.

Under C++ CWG DR 2237, the constructor for a class template C must be
written as 'C(...)' not as 'C<T>(...)'. This fixes a build failure with
GCC in C++20 mode.

In passing, remove some other redundant '<T>' qualification from the
affected classes.
The file was modifiedllvm/include/llvm/ADT/STLExtras.h (diff)