[all-commits] [llvm/llvm-project] 86c01b: [DebugInfo] [PDB] Force injected source paths to u...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Nov 5 12:51:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86c01b1bc6aed83f93c359f513105af6b626fa8c
      https://github.com/llvm/llvm-project/commit/86c01b1bc6aed83f93c359f513105af6b626fa8c
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M llvm/lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp

  Log Message:
  -----------
  [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


  Commit: f0955922a258aa6d59379b254df2d1b4ab9676af
      https://github.com/llvm/llvm-project/commit/f0955922a258aa6d59379b254df2d1b4ab9676af
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M llvm/unittests/DebugInfo/DWARF/DWARFDieTest.cpp

  Log Message:
  -----------
  [unittests] [DWARF] Generalize path separator expectations

This fixes unit tests if running on Windows with a build configured
to prefer forward slashes.

Differential Revision: https://reviews.llvm.org/D113257


  Commit: a2c9cf4c76974086a206c86a172085162a57de9b
      https://github.com/llvm/llvm-project/commit/a2c9cf4c76974086a206c86a172085162a57de9b
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-11-05 (Fri, 05 Nov 2021)

  Changed paths:
    M lldb/include/lldb/Utility/FileSpec.h
    M lldb/source/Utility/FileSpec.cpp

  Log Message:
  -----------
  [lldb] Use is_style_posix() for path style checks

Since a8b54834a186f5570b49b614e31b961a9cf1cbfe, there are two
distinct Windows path styles, `windows_backslash` (with the old
`windows` being an alias for it) and `windows_slash`.
4e4883e1f394f7c47ff3adee48039aa8374bb8d0 added helpers for
inspecting path styles.

The newly added windows_slash path style doesn't end up used in
LLDB yet anyway, as LLDB is quite decoupled from most of
llvm::sys::path and uses its own FileSpec class. To take it in
use, it could be hooked up in `FileSpec::Style::GetNativeStyle`
(in lldb/source/Utility/FileSpec.cpp) just like in the `real_style`
function in llvm/lib/Support/Path.cpp in
df0ba47c36f6bd0865e3286853b76d37e037c2d7.

It is not currently clear whether there's a real need for using
the Windows path style with forward slashes in LLDB (if there's any
other applications interacting with it, expecting that style), and
what other changes in LLDB are needed for that to work, but this
at least makes some of the checks more ready for the new style,
simplifying code a bit.

Differential Revision: https://reviews.llvm.org/D113255


Compare: https://github.com/llvm/llvm-project/compare/d75ab7d548c0...a2c9cf4c7697


More information about the All-commits mailing list