Files
llvm-project/clang/lib/Basic/TargetID.cpp
Yaxun (Sam) Liu f9696949c3 [ClangLinkerWrapper] Refactor target ID sanitization for Windows file… (#168744)
… names

Fix non-RDC mode HIP compilation for the new driver on Windows due to
invalid temporary file names when offload arch is a target ID containing
':', which is invalid in file names on Windows.

Refactor the existing handling of ':' in file names on Windows from
clang driver into a shared function sanitizeTargetIDInFileName in
clang/Basic/TargetID.h. This function replaces ':' with '@' on Windows
only, preserving the original behavior.

Update both clang/lib/Driver/Driver.cpp and
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp to use this
shared function, ensuring consistent handling across both tools.
2025-11-19 20:22:22 -05:00

6.8 KiB