[llvm] [LIT] replace `lit.util.mkdir` with `pathlib.Path.mkdir` (PR #163948)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 31 09:54:16 PDT 2025
================
@@ -462,16 +462,15 @@ def executeBuiltinMkdir(cmd, cmd_shenv):
stderr = StringIO()
exitCode = 0
for dir in args:
- cwd = cmd_shenv.cwd
- dir = to_unicode(dir) if kIsWindows else to_bytes(dir)
- cwd = to_unicode(cwd) if kIsWindows else to_bytes(cwd)
- if not os.path.isabs(dir):
- dir = lit.util.abs_path_preserve_drive(os.path.join(cwd, dir))
+ dir = pathlib.Path(dir)
+ cwd = pathlib.Path(to_unicode(cmd_shenv.cwd))
----------------
arichardson wrote:
All these python2->3 to_unicode() etc. helpers should probably be cleaned up as a follow-up.
https://github.com/llvm/llvm-project/pull/163948
More information about the llvm-commits
mailing list