[all-commits] [llvm/llvm-project] f15377: [libcxx] [test] Use string().c_str() to convert a ...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Feb 25 14:11:17 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f15377084c3094ad47eca8738f15d397f558df7b
      https://github.com/llvm/llvm-project/commit/f15377084c3094ad47eca8738f15d397f558df7b
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
    M libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
    M libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
    M libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
    M libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp

  Log Message:
  -----------
  [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


  Commit: 3be7968c36c313b0de1baca0a87be2b98cb7f7c1
      https://github.com/llvm/llvm-project/commit/3be7968c36c313b0de1baca0a87be2b98cb7f7c1
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
    M libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp
    M libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp

  Log Message:
  -----------
  [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


  Commit: 72fe14d40a527465deb76c9b2241297635fd45bf
      https://github.com/llvm/llvm-project/commit/72fe14d40a527465deb76c9b2241297635fd45bf
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M libcxx/utils/ci/runtimes/CMakeLists.txt

  Log Message:
  -----------
  [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


  Commit: fb2e4f5401d3ec2507ac3b2c4f86d4bfa07c01ec
      https://github.com/llvm/llvm-project/commit/fb2e4f5401d3ec2507ac3b2c4f86d4bfa07c01ec
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M libcxx/utils/libcxx/test/config.py
    M libcxx/utils/libcxx/test/target_info.py

  Log Message:
  -----------
  [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


Compare: https://github.com/llvm/llvm-project/compare/3573a90b8aec...fb2e4f5401d3


More information about the All-commits mailing list