[PATCH] D113265: [DebugInfo] [PDB] Force injected source paths to use backslashes
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 5 04:51:25 PDT 2021
mstorsjo created this revision.
mstorsjo added reviewers: rnk, thakis.
Herald added a subscriber: hiraditya.
mstorsjo requested review of this revision.
Herald added a project: LLVM.
This fixes lld/COFF/pdb-natvis.test (which only is run on Windows)
when using paths with forward slashes on Windows.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113265
Files:
llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
Index: llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
===================================================================
--- llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
+++ llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
@@ -103,7 +103,7 @@
// table and the hash value is dependent on the exact contents of the string.
// link.exe lowercases a path and converts / to \, so we must do the same.
SmallString<64> VName;
- sys::path::native(Name.lower(), VName);
+ sys::path::native(Name.lower(), VName, sys::path::Style::windows_backslash);
uint32_t NI = getStringTableBuilder().insert(Name);
uint32_t VNI = getStringTableBuilder().insert(VName);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113265.385028.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211105/c8f3ecea/attachment.bin>
More information about the llvm-commits
mailing list