[llvm-bugs] [Bug 39025] New: Don't automatically convert to forward slashes in Windows paths

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 20 09:39:30 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39025

            Bug ID: 39025
           Summary: Don't automatically convert to forward slashes in
                    Windows paths
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-ar
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: llvm-bugs at lists.llvm.org

At the moment, llvm-ar converts '\' to '/' in Windows relative file paths when
adding thin archive members. However, '\' is the normal separator on Windows.

Ideally, we should use '\' all the time, but this would make testing using
llvm-ar somewhat tricky to make platform-independent, due to the need to handle
paths in either direction, so we may need to consider a rule, such as switch to
backslash, if there is at least one such separator in the path, otherwise
preserve as forward slash.

Example:
C:\foo\bar -> C:\foo\bar
C:\foo/bar -> C:\foo\bar
C:/foo/bar -> C:/foo/bar

Note that llvm-ar currently does not attempt to normalise slash direction in
absolute paths. It should probably do so, for both absolute or relative,
regardless of the slashes used within the path.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180920/cc8a59b9/attachment.html>


More information about the llvm-bugs mailing list