[all-commits] [llvm/llvm-project] e6f5e4: [Windows][Support] Add helper to expand short 8.3 ...
Ben Dunbobbin via All-commits
all-commits at lists.llvm.org
Tue Feb 10 08:44:25 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e6f5e4910df519a3f14e0db86d24abe8fd25082b
https://github.com/llvm/llvm-project/commit/e6f5e4910df519a3f14e0db86d24abe8fd25082b
Author: Ben Dunbobbin <Ben.Dunbobbin at sony.com>
Date: 2026-02-10 (Tue, 10 Feb 2026)
Changed paths:
M llvm/include/llvm/Support/Windows/WindowsSupport.h
M llvm/lib/Support/Windows/Path.inc
M llvm/unittests/Support/Path.cpp
Log Message:
-----------
[Windows][Support] Add helper to expand short 8.3 form paths (#178480)
Windows supports short 8.3 form filenames (for example,
`compile_commands.json` -> `COMPIL~1.JSO`) for legacy reasons. See:
https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#short-vs-long-names
Such paths are not unusual because, on Windows, the system temporary
directory is commonly derived from the `TMP`/`TEMP` environment
variables. For historical compatibility reasons, these variables are
often set to short 8.3 form paths on systems where user names exceed
eight characters.
Introduce `windows::makeLongFormPath()` to convert paths to their long
form by expanding any 8.3 components via `GetLongPathNameW`.
As part of this change:
- Extended-length path prefix handling is centralized by adding
`stripExtendedPrefix()` and reusing it in `realPathFromHandle()`.
- `widenPath()` is cleaned up to use shared prefix constants.
This was split out from #178303 at the request of the codeowner so that
the Windows support parts can be reviewed separately.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list