[PATCH] D57769: [PDB] Remove dots and canonicalize slashes when using /PDBSOURCEPATH
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 10:31:21 PST 2019
zturner created this revision.
zturner added reviewers: rnk, thakis.
Herald added a project: LLVM.
In a previous patch, I made changes so that PDBs which were
generated on non-Windows platforms contained sensical paths
for the host. While this is an esoteric use case, we need
it to be supported for certain cross compilation scenarios
especially with LLDB, which can debug things on non-Windows
platforms.
However, this regressed a case where you specify /PDBSOURCEPATH
and use a windows-style path. Previously, we would still remove
dots and canonicalize slashes to backslashes, but since my
change intentionally tried to support non-backslash paths, this
was broken.
This patch fixes the situation by trying to guess which path
style the user is specifying when /PDBSOURCEPATH is passed.
It is intentionally conservative, erring on the side of a
Windows path style unless absolutely certain. All dots are
removed and slashes canonicalized to whatever the deduced
path style is after appending the file path to the /PDBSOURCEPATH
argument.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D57769
Files:
lld/COFF/PDB.cpp
lld/test/COFF/Inputs/pdb-source-path.yaml
lld/test/COFF/pdb-source-path.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57769.185345.patch
Type: text/x-patch
Size: 13214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/1421bd14/attachment.bin>
More information about the llvm-commits
mailing list