Skip to content

Commit 86c01b1

Browse files
committed
[DebugInfo] [PDB] Force injected source paths to use backslashes
This fixes lld/COFF/pdb-natvis.test (which only is run on Windows) when using paths with forward slashes on Windows. Differential Revision: https://reviews.llvm.org/D113265
1 parent d75ab7d commit 86c01b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void PDBFileBuilder::addInjectedSource(StringRef Name,
103103
// table and the hash value is dependent on the exact contents of the string.
104104
// link.exe lowercases a path and converts / to \, so we must do the same.
105105
SmallString<64> VName;
106-
sys::path::native(Name.lower(), VName);
106+
sys::path::native(Name.lower(), VName, sys::path::Style::windows_backslash);
107107

108108
uint32_t NI = getStringTableBuilder().insert(Name);
109109
uint32_t VNI = getStringTableBuilder().insert(VName);

0 commit comments

Comments
 (0)