[libcxx-commits] [PATCH] D151913: [libc++] Make sure we use POSIX paths in header_information.py

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 1 19:56:38 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6091025b857a: [libc++] Make sure we use POSIX paths in header_information.py (authored by ldionne).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151913

Files:
  libcxx/utils/libcxx/test/header_information.py


Index: libcxx/utils/libcxx/test/header_information.py
===================================================================
--- libcxx/utils/libcxx/test/header_information.py
+++ libcxx/utils/libcxx/test/header_information.py
@@ -130,28 +130,22 @@
         and file.name != "libcxx.imp"
     )
 
-monorepo_root = pathlib.Path(
-    os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
-)
-include = pathlib.Path(os.path.join(monorepo_root, "libcxx", "include"))
-test = pathlib.Path(os.path.join(monorepo_root, "libcxx", "test"))
-assert monorepo_root.exists()
+libcxx_root = pathlib.Path(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
+include = pathlib.Path(os.path.join(libcxx_root, "include"))
+test = pathlib.Path(os.path.join(libcxx_root, "test"))
+assert libcxx_root.exists()
 
 toplevel_headers = sorted(
-    str(p.relative_to(include)) for p in include.glob("[a-z]*") if is_header(p)
+    p.relative_to(include).as_posix() for p in include.glob("[a-z]*") if is_header(p)
 )
 experimental_headers = sorted(
-    str(p.relative_to(include))
-    for p in include.glob("experimental/[a-z]*")
-    if is_header(p)
+    p.relative_to(include).as_posix() for p in include.glob("experimental/[a-z]*") if is_header(p)
 )
 public_headers = toplevel_headers + experimental_headers
 private_headers = sorted(
-    str(p.relative_to(include))
-    for p in include.rglob("*")
-    if is_header(p)
-    and str(p.relative_to(include)).startswith("__")
-    and not p.name.startswith("pstl")
+    p.relative_to(include).as_posix() for p in include.rglob("*") if is_header(p)
+                                                                     and str(p.relative_to(include)).startswith("__")
+                                                                     and not p.name.startswith("pstl")
 )
 variables = {
     "toplevel_headers": toplevel_headers,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151913.527708.patch
Type: text/x-patch
Size: 1959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230602/daf4e980/attachment.bin>


More information about the libcxx-commits mailing list