[libcxx-commits] [PATCH] D98109: [libcxx] Make path::absolute return paths with separators in preferred form

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 23:55:49 PST 2021


mstorsjo created this revision.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

This fixes the fs.op.absolute tests with libc++. The testcase
was earlier modified in 321f696920630be1b3c93e2a8b965c624ddd646c <https://reviews.llvm.org/rG321f696920630be1b3c93e2a8b965c624ddd646c>
to match the behaviour of MS STL.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98109

Files:
  libcxx/src/filesystem/operations.cpp


Index: libcxx/src/filesystem/operations.cpp
===================================================================
--- libcxx/src/filesystem/operations.cpp
+++ libcxx/src/filesystem/operations.cpp
@@ -698,7 +698,7 @@
 
 path __absolute(const path& p, error_code* ec) {
   path cwd;
-  return __do_absolute(p, &cwd, ec);
+  return __do_absolute(p, &cwd, ec).make_preferred();
 }
 
 path __canonical(path const& orig_p, error_code* ec) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98109.328746.patch
Type: text/x-patch
Size: 433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210306/68ac6346/attachment.bin>


More information about the libcxx-commits mailing list