[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
Sat Mar 6 10:00:36 PST 2021


mstorsjo updated this revision to Diff 328777.
mstorsjo added a comment.

Using a separate return value variable as requested


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98109/new/

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,9 @@
 
 path __absolute(const path& p, error_code* ec) {
   path cwd;
-  return __do_absolute(p, &cwd, ec);
+  path ret = __do_absolute(p, &cwd, ec);
+  ret.make_preferred();
+  return ret;
 }
 
 path __canonical(path const& orig_p, error_code* ec) {


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


More information about the libcxx-commits mailing list